|
Using
After Installation, just get the $connection object like this: $connection = Mongodloid_Connection::getInstance(); (It's a singleton, so you can run Mongodloid_Connection::getInstance(); again and again.) To get a DB and collection object, try $db = $connection->getDb('test'); // <- Mongodloid_DB
$collection = $db->getCollection('supercollection'); // <- Mongodloid_CollectionAny links to the dbs and collections is cached, so feel free to use ->getDb() and ->getCollection() as much as you want to.
For further information, see tests/Mongodloid folder. There are the latest use-cases, functions, etc. |
► Sign in to add a comment