2017 © Pedro Peláez
 

library mongator

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

image

mongator/mongator

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  • Monday, June 9, 2014
  • by mcuadros
  • Repository
  • 5 Watchers
  • 33 Stars
  • 3,191 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 10 Forks
  • 3 Open issues
  • 18 Versions
  • 0 % Grown

The README.md

Mongator ODM, (*1)

Mongator Build Status

Mongator is to the ODMs what Mongo is to databases., (*2)

  • Simple: Mongator is developed in a simple way. This makes it very easy to learn, use, and avoid bugs.
  • Powerful: Mongator is very flexible thanks to Mondator, so you'll be able to use it to develop any type of application.
  • Ultrafast: Mongator has been designed to be extremely light in memory consumption and processing cost.

¿Aren't you convinced yet? Let me show you a few more features:, (*3)

  • References and Embeds: Mongator allows you to work with [references and embeds] very easily.
  • Extensions: Mongator can be customized infinitely with Mondator Extensions.
  • Indexes: Mongator allows you to work easily with the [indexes] of the collections.
  • Events: Mongator throws hooks before and after inserting, updating, saving and deleting documents.
  • GridFS: Mongator allows to save files of any size using [GridFS].
  • Log: Mongator allows to save logs of the queries to improve the development.
  • batchInsert: Mongator uses [batchInsert] to insert documents in an efficient way.
  • Atomic Operations: Mongator uses [atomic operations] to update and delete documents efficiently.
  • Integratión with IDEs: Mongator uses generated code, so you may integrate it with your IDE.
  • Tested: Mongator is completely tested with automated test with [PHPUnit].

Mongator is the fastest mapper in PHP by far. More information in the [performance comparison]., (*4)

Requirements

  • PHP 5.3.x;
  • ext-mongo > 1.2.11

Installation

The recommended way of installing Mongator is through composer. You can see package information on Packagist., (*5)

{
    "require": {
        "mongator/mongator": "1.4.*"
    }
}

Examples

$query = $articleRepository->createQuery(); // Model\ArticleQuery
$query = $articleRepository->createQuery($criteria);

// methods (fluent interface)
$query
    ->criteria(array('is_active' => true))
    ->fields(array('title' => 1))
    ->sort(array('date' => -1))
    ->limit(10)
    ->skip(25)
    ->batchSize(3)
    ->hint(array('date' => 1))
    ->slaveOkay(true)
    ->snapshot(true)
    ->timeout(100)

    ->references() // Mongator's extra
;

// the real query is only executed in these cases
foreach ($query as $result) { // iterating (IteratorAggregate interface)
}
$articles = $query->all(); // retrieving all results explicitly
$article = $query->one(); // retrieving one result  explicitly

// counting results (directly, without hydrate)
$nb = $query->count();
$nb = count($query); // Countable interface

Tests

Tests are in the tests folder. To run them, you need PHPUnit. Example:, (*6)

$ phpunit --configuration phpunit.xml.dist

Benchmarking

A small suite of benchmarking is included with the package, you can run the suite with this command:, (*7)

bash php ./vendor/bin/athletic -b tests/bootstrap.php -p tests/Mongator/Benchmarks/, (*8)

Some results can be find at: https://gist.github.com/mcuadros/9560576, (*9)

License

MIT, see LICENSE, (*10)

The Versions

09/06 2014

dev-master

9999999-dev http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ripollés

mongodb odm

09/06 2014

v1.5.2

1.5.2.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ripollés

mongodb odm

22/05 2014

v1.5.1

1.5.1.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ripollés

mongodb odm

22/05 2014

v1.5.0

1.5.0.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ripollés

mongodb odm

22/05 2014

dev-event-dispatcher

dev-event-dispatcher http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ripollés

mongodb odm

24/04 2014

v1.4.7

1.4.7.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ripollés

mongodb odm

22/04 2014

v1.4.6

1.4.6.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Daniel Ripollés

mongodb odm

25/02 2014

v1.4.5

1.4.5.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

06/02 2014

v1.4.4

1.4.4.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

05/02 2014

v1.4.3

1.4.3.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

05/02 2014

v1.4.2

1.4.2.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

25/11 2013

v1.4.1

1.4.1.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

16/09 2013

v1.4.0

1.4.0.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

21/08 2013

v1.3.0

1.3.0.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

29/05 2013

v1.2.1

1.2.1.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

08/05 2013

v1.2.0

1.2.0.0 http://mongator.com

Mongator is a easy, powerful and ultrafast ODM for PHP and MongoDB. (forked from Mandango project)

  Sources   Download

MIT

The Requires

 

by Daniel Ripollés

mongodb odm

16/04 2013

v1.1.0

1.1.0.0 http://mandango.org

Simple, poweful and ultrafast Object Document Mapper (ODM) for PHP and MongoDB

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • yunait/mondator dev-master

 

mongodb odm

26/10 2012

v1.0.0

1.0.0.0 http://mandango.org

Simple, poweful and ultrafast Object Document Mapper (ODM) for PHP and MongoDB

  Sources   Download

MIT

The Requires

 

mongodb odm