downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoGridFS> <MongoCursor::valid
Last updated: Fri, 24 Jul 2009

view this page in

The MongoEmptyObj class

소개

This class is used to insert an empty object into the database.

Inserting an empty array will create an array-type document, which can be used for (among other things) $push updates:

<?php
$collection
->insert(array('x' => array()));
?>

The shell shows that an empty array is saved as an array:

> db.collection.findOne()
{ 'x' : [] }

Inserting a MongoEmptyObj will create an object-type document:

<?php
$collection
->insert(array('x' => new MongoEmptyObj()));
?>

The shell shows that a MongoEmptyObj is saved as an object:

> db.collection.findOne()
{ 'x' : {} }

클래스 개요

MongoEmptyObj
MongoEmptyObj {
}


add a note add a note User Contributed Notes
MongoEmptyObj
There are no user contributed notes for this page.

MongoGridFS> <MongoCursor::valid
Last updated: Fri, 24 Jul 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites