|
1 |
| -phongo libraries |
2 |
| -================ |
| 1 | +MongoDB library for PHP |
| 2 | +======================= |
3 | 3 |
|
4 |
| -MongoDB CRUD interface for [PHongo](https://github.com/10gen-labs/mongo-php-driver-prototype). |
| 4 | +This library provides a high-level abstraction around the lower-level |
| 5 | +[PHP driver](https://github.com/10gen-labs/mongo-php-driver-prototype) (i.e. the |
| 6 | +`mongodb` extension). |
5 | 7 |
|
| 8 | +While the extension provides a limited API for executing commands, queries, and |
| 9 | +write operations, this library implements an API similar to that of the |
| 10 | +[legacy PHP driver](http://php.net/manual/en/book.mongo.php). It contains |
| 11 | +abstractions for client, database, and collection objects, and provides methods |
| 12 | +for CRUD operations and common commands (e.g. index and collection management). |
6 | 13 |
|
7 |
| -This interface is meant for the general public to use with PHongo, |
8 |
| -and will serve as the default reference interface when creating other bindings. |
| 14 | +If you are developing an application with MongoDB, you should consider using |
| 15 | +this library, or another high-level abstraction, instead of the extension alone. |
9 | 16 |
|
| 17 | +For further information about the architecture of this library and the `mongodb` |
| 18 | +extension, see: |
| 19 | + |
| 20 | + - http://www.mongodb.com/blog/post/call-feedback-new-php-and-hhvm-drivers |
10 | 21 |
|
11 | 22 | ## Documentation
|
12 |
| -- http://10gen-labs.github.io/mongo-php-library-prototype/ |
| 23 | + |
| 24 | + - http://10gen-labs.github.io/mongo-php-library-prototype/ |
13 | 25 |
|
14 | 26 | # Installation
|
15 | 27 |
|
16 |
| -As `PHongo libraries` is an abstraction layer for PHongo, it naturally requires |
17 |
| -[PHongo to be installed](http://10gen-labs.github.io/mongo-php-driver-prototype/#installation): |
18 |
| - |
19 |
| - $ wget https://github.com/10gen-labs/mongo-php-driver-prototype/releases/download/0.1.5/phongo-0.1.5.tgz |
20 |
| - $ pecl install phongo-0.1.5.tgz |
21 |
| - $ echo "extension=phongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` |
22 |
| - |
23 |
| -The best way to then install `PHongo libraries` is via [composer](https://getcomposer.org/) |
24 |
| -by adding the following to |
25 |
| -[composer.json](https://getcomposer.org/doc/01-basic-usage.md#composer-json-project-setup): |
26 |
| - |
27 |
| -```json |
28 |
| - "repositories": [ |
29 |
| - { |
30 |
| - "type": "vcs", |
31 |
| - "url": "https://github.com/10gen-labs/mongo-php-libraries-prototype" |
32 |
| - } |
33 |
| - ], |
34 |
| - "require": { |
35 |
| - "ext-phongo": ">=0.1.5", |
36 |
| - "10gen-labs/mongo-php-libraries-prototype": "dev-master" |
37 |
| - } |
38 |
| -``` |
39 |
| - |
40 |
| -and then running |
41 |
| - |
42 |
| -```shell |
43 |
| -$ composer install |
44 |
| -``` |
45 |
| - |
46 |
| -## Reporting tickets |
47 |
| -- https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1 |
| 28 | +As a high-level abstraction for the driver, this library naturally requires that |
| 29 | +the [`mongodb` extension be installed](http://10gen-labs.github.io/mongo-php-driver-prototype/#installation): |
| 30 | + |
| 31 | + $ pecl install mongodb-alpha |
| 32 | + $ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` |
| 33 | + |
| 34 | +The preferred method of installing this library is with |
| 35 | +[Composer](https://getcomposer.org/) by running the following from your project |
| 36 | +root: |
| 37 | + |
| 38 | + $ composer require "mongodb/mongodb=0.2.x-dev" |
| 39 | + |
| 40 | +## Reporting Issues |
| 41 | + |
| 42 | +Please use the following form to report any issues: |
| 43 | + |
| 44 | + - https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1 |
0 commit comments