tatarko / mongoar
Work with your MongoDB in the active record way
Requires
- php: >=5.4
- lib-mongo: >=0.9
This package is not auto-updated.
Last update: 2025-02-01 17:26:41 UTC
README
MongoAR is simple library that allows you to use active record pattern on the MongoDB databases and their tables. It also provides simple yet powerful query builder for simple building of search criteria for MongoCollection::find()
and MongoCollection::findOne()
methods.
Requirements
MongoAR requires to run correctly:
PHP
, version5.4
or abovemongo
pecl library, version0.9
or above
Instalation
Composer
Simply add a dependency on tatarko/mongoar
to your project's composer.json
file if you use Composer to manage the dependencies of your project. Here is a minimal example of a composer.json
file that just defines a dependency on MongoAR:
{ "require": { "tatarko/mongoar": "0.*" } }
Straight implementation
In case you don't use Composer
as your dependency manager you are still able to use MongoAR
. There are only two easy steps to get MongoAR
work.
- Download MongoAR.zip and put extracted archive into your project's folder.
- Add following code to your project's root php file (e.g.
index.php
) and remember to changepath/to/
according to relative location of downloadedMongoAR
folder:
require_once 'path/to/source/__autoloader.php';
Documentation
Please, see Wiki for online documentation.