2017 © Pedro Peláez
 

library mongo-odm

AObject Document mapper for mongoDB with no proxies, special configuration.

image

andydune/mongo-odm

AObject Document mapper for mongoDB with no proxies, special configuration.

  • Tuesday, June 19, 2018
  • by AndyDune
  • Repository
  • 1 Watchers
  • 0 Stars
  • 40 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 11 % Grown

The README.md

MongoOdm

Build Status Software License Packagist Version Total Downloads, (*1)

Object Document mapper for mongoDB with no proxies, special configuration., (*2)

Installation

Installation using composer:, (*3)

composer require andydune/mongo-odm

Or if composer was not installed globally:, (*4)

php composer.phar require andydune/mongo-odm

Or edit your composer.json:, (*5)

"require" : {
     "andydune/mongo-odm": "^1"
}

And execute command:, (*6)

php composer.phar update

Control types

 $mongo = new \MongoDB\Client();
        $collection = $mongo->selectDatabase('test')->selectCollection('test_odm');
        $collection->deleteMany([]);

        $odmClass = new class($collection) extends DocumentAbstract
        {
            protected function describe()
            {
                $this->fieldsMap['number'] = 'integer';
                $this->fieldsMap['code'] = 'string';
                $this->fieldsMap['birthday'] = 'datetime';
            }
        };

        $time = time();
        $odmClass->number = '12';
        $odmClass->code = '125';
        $odmClass->birthday = date('Y-m-d H:i:s', $time);
        $odmClass->save();

        $res = $collection->findOne(['number' => 12]);
        $this->assertTrue((bool)$res);
        $res = $collection->findOne(['number' => '12']);
        $this->assertFalse((bool)$res);

The Versions

19/06 2018

dev-master

9999999-dev https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm

17/05 2018

v1.3.3

1.3.3.0 https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm

20/04 2018

v1.3.2

1.3.2.0 https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm

20/04 2018

v1.3.1

1.3.1.0 https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm

20/04 2018

v1.3.0

1.3.0.0 https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm

10/04 2018

v1.2.0

1.2.0.0 https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm

09/04 2018

v1.1.1

1.1.1.0 https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm

05/04 2018

v1.1.0

1.1.0.0 https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm

05/04 2018

v1.0.0

1.0.0.0 https://github.com/AndyDune/MongoOdm

AObject Document mapper for mongoDB with no proxies, special configuration.

  Sources   Download

MIT

The Requires

 

The Development Requires

php mongo odm