[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/mongo/mongocollection/_save.xml?=
From: Hannes_Magnusson <bjori () php ! net>
Date: 2012-11-29 0:51:28
Message-ID: svn-bjori-1354150288-328551-80425333 () svn ! php ! net
[Download RAW message or body]
bjori Thu, 29 Nov 2012 00:51:28 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=328551
Log:
Mention we populate the _id field with the pregenerated ID
Changed paths:
U phpdoc/en/trunk/reference/mongo/mongocollection/save.xml
Modified: phpdoc/en/trunk/reference/mongo/mongocollection/save.xml
===================================================================
--- phpdoc/en/trunk/reference/mongo/mongocollection/save.xml 2012-11-29 00:16:49 UTC (rev 328550)
+++ phpdoc/en/trunk/reference/mongo/mongocollection/save.xml 2012-11-29 00:51:28 UTC (rev 328551)
@@ -124,6 +124,7 @@
// insert $obj into the db
$collection->save($obj);
+var_dump($obj);
// add another field
$obj['foo'] = 'bar';
@@ -137,9 +138,34 @@
?>
]]>
</programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+array(2) {
+ ["x"]=>
+ int(1)
+ ["_id"]=>
+ object(MongoId)#4 (1) {
+ ["$id"]=>
+ string(24) "50b6afe544415ed606000000"
+ }
+}
+]]>
+ </screen>
</example>
</refsect1>
+ <refsect1 role="notes"><!-- {{{ -->
+ &reftitle.notes;
+ <note>
+ <para>
+ This method will create an <literal>_id</literal> field in the
+ <parameter>a</parameter> array with a pregenerated ID if the field didn't
+ exist already - unless the argument was a reference.
+ </para>
+ </note>
+ </refsect1><!-- }}} -->
+
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic