[Extension] Yii-Mongodb-Driver


(Fromyukki) #1

Hello, Guys!

Let me introduce new extension for Yii 1.x - It is MongoDb driver with a lot of useful things!

[size="5"]Versions[/size]

Current stable release version is 1.0.1. You can download it from here.

[size="5"]Installation[/size]

You need to clone or download this repo, then unpack it into your extensions folder (protected/extensions/mongoDb) and add some lines in your protected/config/main.php config file:




        // Description of components

        'components' => array(

            // Database

            'mongoDb' => array(

                'class' => 'ext.mongoDb.YMongoClient',

                'server' => 'mongodb://localhost:27017',

                'dbName' => 'database_name',

            ),

        ),



[size="5"]Basic features[/size]

  • Working with Mongo document like with ActiveRecord model;

  • Nested documents (sub documents) support;

  • Relations support;

  • Validation of root and nested documents;

  • Scopes support;

  • DataProvider support;

  • Command builder with a lot of funtions like CDbCommand support;

  • HTTP Session storage extended from CHttpSession;

  • Cache driver extended from CCache;

  • Soft delete behaviour support and 5+ other useful behaviours support.

Full documentation and a lot of examples you can find at the Wiki pages of repo (README.txt).

If you find any bugs, please create an issue at Issue tracker for project GitHub repository (README.txt).