My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Using  
Using the Mongodloid
Featured, Documentation
Updated Dec 11, 2009 by v.go...@gmail.com

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_Collection

Any 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
Powered by Google Project Hosting