Files
mongo-php-driver/docs/index.md
2015-11-02 12:05:31 -05:00

1.1 KiB

What is pecl/mongodb?

pecl/mongodb is a new MongoDB driver for PHP, which will replace the legacy pecl/mongo driver.

This extension is written atop libmongoc and libbson, and purposefully offers a basic API for core functionality (e.g. connection handling, queries, commands, and write operations). Additional functionality is left to be implemented by userland libraries. Our hope is that this seperation of concerns will keep the driver lightweight (and fast), easier to maintain, and make it an ideal starting point for constructing your own framework, library, or application.

Installation

To build and install the driver:

$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

Ultimately, this extension is not intended to be used alone. Users should considering using this driver alongside one or more userland PHP libraries, such as mongo-php-library.