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
[edit] Last updated: Fri, 18 Sep 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.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites