PHP Shell
Latest commit e4e75fc Mar 20, 2017 @azzeddinefaik azzeddinefaik committed with samdark Translated docs into French [skip ci]
Permalink
Failed to load latest commit information.
.github Docs updated May 2, 2016
console/controllers Fixed incorrect order of migrations history in case `yii\mongodb\cons… Nov 14, 2016
debug release version 2.1.2 Oct 31, 2016
docs Translated docs into French [skip ci] Mar 20, 2017
file Fixed `yii\mongodb\file\Upload` unable to handle custom `_id` value, … Jan 26, 2017
gii/model Methods `listCollections()` and `listDatabases()` added to `Command` Jun 17, 2016
i18n PHPDoc fix Nov 24, 2016
log `MongoDbTarget` now uses `batchInsert()` while exporting log messages Apr 19, 2016
rbac Fixed exception is thrown on `yii\mongodb\rbac\MongoDbManager::invali… Feb 20, 2017
tests Fixed exception is thrown on `yii\mongodb\rbac\MongoDbManager::invali… Feb 20, 2017
validators Fixed `yii\mongodb\validators\MongoDateValidator` uses seconds instea… Dec 27, 2016
views Added migration namespace support Sep 12, 2016
.editorconfig Add editorconfig [skip ci] Sep 29, 2015
.gitattributes Added issue templates Mar 21, 2016
.gitignore ignore composer.lock May 10, 2015
.travis.yml `fxp/composer-asset-plugin` version raised to '1.2.0' Jul 6, 2016
ActiveFixture.php Fixed `yii\mongodb\ActiveFixture` fails to find default data file if … Aug 22, 2016
ActiveQuery.php Method `yii\mongodb\ActiveQuery::exists()` optimized avoiding redunda… Dec 27, 2016
ActiveRecord.php fixing unit tests Dec 13, 2016
BatchQueryResult.php PHPDoc fix Nov 24, 2016
CHANGELOG.md Fixed exception is thrown on `yii\mongodb\rbac\MongoDbManager::invali… Feb 20, 2017
Cache.php PHPDoc fix Nov 24, 2016
Collection.php PHPDoc fix Nov 24, 2016
Command.php PHPDoc fix Nov 24, 2016
Connection.php Added missing `@since` tags Jan 16, 2017
Database.php release version 2.1.2 Oct 31, 2016
Exception.php Reformat code te be PSR-2 compatible Mar 16, 2014
LICENSE.md psr-4 change. Jan 11, 2014
LogBuilder.php fixing unit tests Dec 13, 2016
Migration.php release version 2.1.2 Oct 31, 2016
Query.php Aggregation docs added Mar 17, 2017
QueryBuilder.php PHPDoc fix Nov 24, 2016
README.md Doc improvement Nov 24, 2016
Session.php release version 2.1.2 Oct 31, 2016
UPGRADE.md UPGRADE notes for 2.1 improved Jun 22, 2016
composer.json Doc improvement Nov 24, 2016
phpunit.xml.dist Added unit tests Mar 23, 2015

README.md

MongoDB Extension for Yii 2

This extension provides the MongoDB integration for the Yii framework 2.0.

For license information check the LICENSE-file.

Documentation is at docs/guide/README.md.

Latest Stable Version Total Downloads Build Status

Installation

This extension requires MongoDB PHP Extension version 1.0.0 or higher.

This extension requires MongoDB server version 3.0 or higher.

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiisoft/yii2-mongodb

or add

"yiisoft/yii2-mongodb": "~2.1.0"

to the require section of your composer.json.

Configuration

To use this extension, simply add the following code in your application configuration:

return [
    //....
    'components' => [
        'mongodb' => [
            'class' => '\yii\mongodb\Connection',
            'dsn' => 'mongodb://developer:password@localhost:27017/mydatabase',
        ],
    ],
];