note 114522 added to mongodb.construct
| From: | mike at eastghost dot com | Date: | Mon, 03 Mar 2014 23:58:25 +0000 |
| Subject: | note 114522 added to mongodb.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198773@lists.php.net to get a copy of this message | ||
To use DICE (Dependency Injection Container) you'll need to use this format
// $Mongo = new \MongoClient( arrConnectionOptions );
// $Mdb = new \MongoDB( $Mongo, 'dbName' );
$dice->create( '\Mongo' );
$dice->create( '\Mdb' );
and not this one
$Mdb = $Mongo->dbName;
----
Server IP: 192.41.45.150
Probable Submitter: 74.96.181.211
----
Manual Page -- http://php.net/manual/en/mongodb.construct.php
Edit -- https://master.php.net/note/edit/114522
Del: integrated -- https://master.php.net/note/delete/114522/integrated
Del: useless -- https://master.php.net/note/delete/114522/useless
Del: bad code -- https://master.php.net/note/delete/114522/bad+code
Del: spam -- https://master.php.net/note/delete/114522/spam
Del: non-english -- https://master.php.net/note/delete/114522/non-english
Del: in docs -- https://master.php.net/note/delete/114522/in+docs
Del: other reasons-- https://master.php.net/note/delete/114522
Reject -- https://master.php.net/note/reject/114522
Search -- https://master.php.net/manage/user-notes.php