Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

380 lines (271 sloc) 12.918 kB
.. _php-libraries-frameworks-and-tools:
===================================
PHP Libraries, Frameworks and Tools
===================================
.. default-domain:: mongodb
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 <https://github.com/ichikaway/cakephp-mongodb>`_.
- `Introductory blog post <http://mark-story.com/posts/view/using-mongodb-with-cakephp>`_
on using it with MongoDB.
Codeigniter
~~~~~~~~~~~
- `Codeigniter-MongoDB-Library <https://github.com/vesparny/cimongo-codeigniter-mongodb-library>`_
.. THE ABOVE IS NOT THE ORIGINAL LINK TARGET IN THE RST. It was
https://github.com/huglester/MongoDB-CodeIgniter-Driver . There are so many forks of this lib
that it maybe doesn't make any sense to link it? All of them seem out of date
.. THE ABOVE IS NOT THE ORIGINAL LINK TARGET IN THE WIKI. The original target to Kyle Dye's
branch (http://github.com/kyledye/MongoDB-CodeIgniter-Driver) no longer works. His branch
has been merged into the new target.
Doctrine
~~~~~~~~
`ODM <http://www.doctrine-project.org/projects/mongodb-odm.html>`_
(Object Document Mapper) is an experimental Doctrine MongoDB object
mapper. The ``Doctrine\ODM\Mongo`` 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 <http://www.doctrine-project.org/projects/mongodb-odm.html>`_:
API, Reference, and Cookbook
- `Official blog post <http://www.doctrine-project.org/blog/index.html>`_
- `Screencast <http://www.screencast.com/users/jwage/folders/Default/media/d01858d5-f9f4-43e3-a3e1-669729a85fcc>`_
- `Blog post on using with Symfony <http://blog.servergrove.com/2010/04/28/mongodb-with-php-and-symfony/>`_
- `Bug tracker <http://www.doctrine-project.org/jira/browse/MODM>`_
Drupal
~~~~~~
`MongoDB Integration <http://drupal.org/project/mongodb>`_:
Views (query builder) backend, a watchdog implementation (logging),
and field storage.
Fat-Free Framework
~~~~~~~~~~~~~~~~~~
`Fat-Free <http://fatfreeframework.com/>`_ is a powerful yet
lightweight PHP 5.3+ Web development framework designed to help you
build dynamic and robust applications fast.
Kohana Framework
~~~~~~~~~~~~~~~~
`Mango <https://github.com/Wouterrr/mangodb>`_: An
ActiveRecord-like library for PHP, for the
`Kohana <http://kohanaframework.org/>`_ PHP Framework.
Lithium
~~~~~~~
`Lithium <http://li3.me/>`_ supports MongoDB out-of-the-box.
Laravel Framework
~~~~~~~~~~~~~~~~~
- `Laravel Mandango <https://github.com/adamlc/laravel-mandango>`_: An
ODM for MongoDB, that integrates with the `Laravel
<http://laravel.com>`_ PHP Framework.
- `Laravel MongoDB <https://github.com/jenssegers/laravel-mongodb>`_:
A model and query builder with support for MongoDB, using the
original Laravel API.
Symfony 2
~~~~~~~~~
- `Symfony 2 Logger <http://code.google.com/p/mongodbloganalyzer/>`_: A
centralized logger for Symfony applications. See
`blog post on Symfony <http://obvioushints.blogspot.com/2009/07/my-guess-on-symfony-2.html>`_.
- `sfMongoSessionStorage <https://github.com/brtriver/sfMongoSessionStorage>`_:
Manages session storage via MongoDB with symfony.
- `sfStoragePerformancePlugin <http://www.symfony-project.org/plugins/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 <https://github.com/Bioshox/Thundergrid>`_ is a
:manual:`GridFS </applications/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
~~~~
.. image:: /figures/php-libraries-frameworks-and-tools-vork.png
`Vork <http://www.vork.us/>`_, 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.
Webiny Framework
~~~~~~~~~~~~~~~~
`Webiny Framework <http://www.webiny.com/>`_ is an open source
web development framework written in PHP 5.5. The `Entity Component
<http://www.webiny.com/webiny-framework/php-entity-mongodb-odm/>`_ is a
full-featured Object Document Wrapper for MongoDB. It provides simple
creation and filtering of records on multiple collections. In
combination with the `Mongo Component
<http://www.webiny.com/webiny-framework/php-mongodb/>`_ it provides
seamless integration.
You can download the library from our `GitHub
<https://github.com/Webiny/Framework/>`_ or you can use ``composer``:
.. code-block:: sh
composer require webiny/framework
Yamop
~~~~~
This is yet another, open source, and very simple ODM for MongoDB. It
works like the standard MongoDB PHP extension interface but returns
objects instead of arrays (as ODM). Queries stay the same. Provides
driver level "joins," that resolves related objects.
See: `Yamop <https://github.com/mawelous/yamop>`_ and `Yamop for
Laravel <https://github.com/mawelous/yamop-laravel>`_.
Yii
~~~
`Yii MongoDB Driver <https://github.com/fromYukki/Yii-MongoDB-Driver>`_ is a Yii1 extension
which plans on supporting Yii2.
`mongoyii <http://github.com/Sammaye/MongoYii/>`_ is a lightweight
ActiveRecord-like support for MongoDB in Yii.
Yii2
~~~~
The `Yii2 Framework <https://github.com/yiisoft/yii2/>`_ includes a
`MongoDB Extension <https://github.com/yiisoft/yii2/tree/master/extensions/mongodb>`_.
Zend Framework
~~~~~~~~~~~~~~
- `Shanty Mongo <https://github.com/coen-hyde/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 <https://github.com/stunti/Stunti_Cache_Backend_Mongo>`_:
supports tags and auto-cleaning.
Phalcon Framework
~~~~~~~~~~~~~~~~~
`Object-Document Mapper
<http://docs.phalconphp.com/en/latest/reference/odm.html>`_ The ODM
offers a CRUD functionality, events, validations among other
services.
Stand-Alone Tools
-----------------
Autocomplete for IDEs
~~~~~~~~~~~~~~~~~~~~~
`PeclMongoPhpDoc <https://github.com/localgod/PeclMongoPhpDoc>`_ gives
IDEs information about the Pecl extension to help with autocomplete and
docs.
ActiveMongo
~~~~~~~~~~~
- `ActiveMongo <https://github.com/crodas/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 <https://github.com/parf/Mongo-PHP-ORM>`_ is a MongoDB PHP ORM
(part of Comfi.com Homebase Framework)
Mongofilesystem
~~~~~~~~~~~~~~~
`Mongofilesystem <https://github.com/harrydeluxe/mongofilesystem>`_ is
a filesystem based on MongoDB
:manual:`GridFS </applications/gridfs/>`.
It will help you use MongoDB GridFS like a typical filesystem, using
the familiar PHP commands.
Mandango
~~~~~~~~
`Mandango <http://mandango.org/>`_ is a simple, powerful, ultrafast
Object Document Mapper (ODM) for PHP and MongoDB.
Mongator ODM
~~~~~~~~~~~~
`Mongator ODM <https://github.com/mongator/mongator/>`_ is an easy,
powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)
Up-to-date and mantained, currently used in production.
MongoDB Pagination
~~~~~~~~~~~~~~~~~~
PHP `MongoDB Pagination <http://sourceforge.net/projects/mongopagination/>`_
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 <https://github.com/colinmollenhour/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.
Mongo-Queue-PHP
~~~~~~~~~~~~~~~
PHP message queue using MongoDB as a backend
`Mongo-Queue-PHP page <https://github.com/dominionenterprises/mongo-queue-php>`_
MongoQueue
~~~~~~~~~~
`MongoQueue <https://github.com/lunaru/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 <http://www.oodle.com/>`_. Oodle uses MongoQueue to background
common tasks in order to keep page response times low.
MongoRecord
~~~~~~~~~~~
`MongoRecord <https://github.com/lunaru/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 <http://www.oodle.com/>`_. 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 <https://github.com/a-musing-moose/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 <https://github.com/ibwhite/simplemongophp>`_ at
GitHub is a simple layer for using data objects. See
`blog post <https://groups.google.com/forum/?hl=en&fromgroups=#!topic/mongodb-user/_VHvXu7OIjg>`_.
Mongodm
~~~~~~~
`Mongodm <https://github.com/purekid/mongodm>`_ is a simple and
flexible PHP MongoDB ORM that includes support for references (lazy
loading,) and multilevel inheritance.
kanon-mongo
~~~~~~~~~~~
`kanon-mongo <https://github.com/olamedia/kanon-mongo>`_ is a simple
memory-safe PHP MongoDB ORM.
Requirements: PHP >= 5.3, PECL mongoclient >= 1.3.0
PHPMongo
~~~~~~~~
`PHPMongo <https://github.com/sokil/php-mongo>`_ is a ODM with support
of validating, relations, events and behaviors.
MongoFilesystem
~~~~~~~~~~~~~~~
`MongoFilesystem <https://github.com/AlexanderMitov/MongoFilesystem>`
is a filesystem implementation on top of MongoDB. The library manages
file/folder hierarchy by using GridFS and standard collections. It has
a rich API and JSON/XML/HTML renderers as well.
Blogs & HOWTOs
--------------
How to batch import JSON data output from FFprobe for motion stream analysis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FFprobe is a stream analyzer that optionally reports in JSON. This
example is a PHP script that reads JSON from STDIN, makes an object
using json_decode, and inserts the object into a MongoDB database. This
script could be used with any program that outputs a JSON stream. A bash
script will be used to batch process all files within the current
directory. For example, the data may be used for analysis and logging of
a day's shoot.
- `Batch import Multimedia Stream Data into MongoDB with FFprobe <http://www.waitman.net/ffprobe-mongodb-batch-import-json.html>`_
- `Code and Sample Output <https://github.com/creamy/in-ffprobe-mongodb>`_ at GitHub
Jump to Line
Something went wrong with that request. Please try again.