The PHP community has created a huge number of libraries to make working with MongoDB easier and integrate it with existing frameworks.
Libraries and Frameworks
CakePHP
- MongoDB datasource for CakePHP.
- Introductory blog post on using it with MongoDB.
Codeigniter
Doctrine
ODM (Object Document Mapper) is an experimental Doctrine MongoDB object mapper. The DoctrineODMMongo namespace is an experimental project for a PHP 5.3 MongoDB Object Mapper. It allows you to easily write PHP 5 classes and map them to collections in MongoDB. You just work with your objects like normal and Doctrine will transparently persist them to MongoDB.
This project implements the same “style” of the Doctrine 2 ORM project interface so it will look very familiar to you and it has lots of the same features and implementations.
- MongoDB ODM Documentation: API, Reference, and Cookbook
- Official blog post
- Screencast
- Blog post on using with Symfony
- Bug tracker
Drupal
- MongoDB Integration: Views (query builder) backend, a watchdog implementation (logging), and field storage.
Fat-Free Framework
- Fat-Free is a powerful yet lightweight PHP 5.3+ Web development framework designed to help you build dynamic and robust applications fast.
Kohana Framework
- Mango at GitHub: An ActiveRecord-like library for PHP, for the Kohana PHP Framework.
Lithium
- Lithium supports MongoDB out-of-the-box.
Symfony 2
- Symfony 2 Logger: A centralized logger for Symfony applications. See blog post on Symfony.
- sfMongoSessionStorage: Manages session storage via MongoDB with symfony.
- sfStoragePerformancePlugin: This plugin contains some extra storage engines (MongoDB and Memcached) that are currently missing from the Symfony (>= 1.2) core.
TechMVC
An extensive MVC 2 based PHP framework which supports MongoDB directly with only PHPMongo extension.
- Hosted at <http://sourceforge.net/projects/techmvc/>
- Demo example available at <http://demo.techmvc.techunits.com/>
Thundergrid
Thundergrid is a GridFS framework for PHP. Thundergrid is a simple framework written in PHP that allows you to rapidly store files in your MongoDB database using the GridFS specification.
Thundergrid gives you the ability to control exactly how you use GridFS in your scripts. It allows you to list, filter, and display objects within GridFS quickly and rapidly.
Vork
Vork, the high-performance enterprise framework for PHP, natively supports MongoDB as either a primary datasource or used in conjunction with an RDBMS. Designed for scalability & Green-IT, Vork serves more traffic with fewer servers and can be configured to operate without any disk-IO.
Vork provides a full MVC stack that outputs semantically-correct XHTML 1.1, complies with Section 508 Accessibility guidelines & Zend-Framework coding-standards, has SEO-friendly URLs, employs CSS-reset for cross-browser display consistency and is written in well-documented object-oriented E_STRICT PHP5 code.
An extensive set of tools are built into Vork for ecommerce (cc-processing, SSL, PayPal, AdSense, shipment tracking, QR-codes), Google Maps, translation & internationalization, Wiki, Amazon Web Services, Social-Networking (Twitter, Meetup, ShareThis, YouTube, Flickr) and much more.
Yii
- YiiMongoDbSuite is an ActiveRecord-like support for MongoDB in Yii. It originally started as a fork of MongoRecord extension to fix some major bugs and to add full featured suite for MongoDB developers.
Zend Framework
- Shanty Mongo is a prototype MongoDB adapter for the Zend Framework. It’s intention is to make working with MongoDB documents as natural and as simple as possible. In particular allowing embedded documents to also have custom document classes.
- ZF Cache Backend for MongoDB: supports tags and auto-cleaning.
- Zend_Nosql_Mongo component proposal
Stand-Alone Tools
Autocomplete for IDEs
- PeclMongoPhpDoc gives IDEs information about the Pecl extension to help with autocomplete and docs.
ActiveMongo
- ActiveMongo is a simple ActiveRecord for MongoDB in PHP.
- There’s an introduction to get you started at <http://crodas.org/activemongo.php>.
Comfi
- Comfi is a MongoDB PHP ORM (part of Comfi.com Homebase Framework)
MapReduce API
- MongoDB-MapReduce-PHP at GitHub is a MapReduce abstraction layer. See blog post on MapReduce.
Mongofilesystem
- Mongofilesystem is a filesystem based on MongoDB GridFS. It will help you use MongoDB GridFS like a typical filesystem, using the familiar PHP commands.
Mandango
- Mandango is a simple, powerful, ultrafast Object Document Mapper (ODM) for PHP and MongoDB.
MongoDB Pagination
- PHP MongoDB Pagination is the pagination plugin for MongoDB released under MIT License. It is simple to install and use. It has been developed under TechMVC 3.0.4 but is compatible with any 3rd party framework (e.g. Zend (tested)).
MongoDb PHP ODM
- MongoDb PHP ODM is a simple object wrapper for the MongoDB PHP driver classes which makes using MongoDB in your PHP application more like ORM, but without the suck. It is designed for use with Kohana 3 but will also integrate easily with any PHP application with almost no additional effort.
Mongodloid
A library on top of the PHP driver that allows you to make more natural queries ($query->query('a == 13 AND b >= 8 && c % 3 == 4');), abstracts away annoying $-syntax, and provides getters and setters.
MongoQueue
MongoQueue is a PHP queue that allows for moving tasks and jobs into an asynchronous process for completion in the background. The queue is managed by MongoDB.
MongoQueue is an extraction from online classifieds site Oodle. Oodle uses MongoQueue to background common tasks in order to keep page response times low.
MongoRecord
MongoRecord is a PHP MongoDB ORM layer built on top of the PHP MongoDB PECL extension.
MongoRecord is an extraction from online classifieds site Oodle. Oodle’s requirements for a manageable, easy to understand interface for dealing with the super-scalable MongoDB datastore was the primary reason for MongoRecord. It was developed to use with PHP applications looking to add MongoDB’s scaling capabilities while dealing with a nice abstraction layer.
Morph
- Morph at GitHub is a high-level PHP library for MongoDB. Morph comprises a suite of objects and object primitives that are designed to make working with MongoDB in PHP a breeze.
simplemongophp
- simplemongophp at GitHub is a simple layer for using data objects. See blog post.
TURBOPY
- TURBOPY is a cloud-based content management framework and IDE using new editing concepts working with MongoDB.
http://docs.mongodb.org/ecosystem/drivers/php-libraries/#php-libraries-frameworks-and-tools
Enter