Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This path should point to Composer's autoloader
- require_once __DIR__ . "/vendor/autoload.php";
- $collection = (new MongoDBClient)->demo->zips;
- $document = $collection->findOne(['_id' => '94301']);
- var_dump($document);
- echo ("document = " . $document->name);
- C:NetBeansWorkPlacemongoDBplaymongo_010.php:19:
- object(MongoDBModelBSONDocument)[13]
- private 'storage' (ArrayObject) =>
- array (size=5)
- '_id' => string '94301' (length=5)
- 'city' => string 'PALO ALTO' (length=9)
- 'loc' =>
- object(MongoDBModelBSONArray)[12]
- private 'storage' (ArrayObject) =>
- array (size=2)
- ...
- 'pop' => int 15965
- 'state' => string 'CA' (length=2)
- C:NetBeansWorkPlacemongoDBplaymongo_003.php:16:
- object(MongoDBModelDatabaseInfo)[4]
- public 'name' => string 'databaseName' (length=12)
- public 'sizeOnDisk' => float 83886080
- public 'empty' => boolean false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement