[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] svn: /phpdoc/en/trunk/reference/mongo/ mongocollection/insert.xml versions.xml
From: Kristina_Chodorow <kristina () php ! net>
Date: 2009-08-27 22:50:20
Message-ID: svn-kristina-1251413420-287824-1923809868 () svn ! php ! net
[Download RAW message or body]
kristina Thu, 27 Aug 2009 22:50:20 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287824
Log:
snapshot and example
Changed paths:
U phpdoc/en/trunk/reference/mongo/mongocollection/insert.xml
U phpdoc/en/trunk/reference/mongo/versions.xml
Modified: phpdoc/en/trunk/reference/mongo/mongocollection/insert.xml
===================================================================
--- phpdoc/en/trunk/reference/mongo/mongocollection/insert.xml 2009-08-27 22:28:23 UTC (rev 287823)
+++ phpdoc/en/trunk/reference/mongo/mongocollection/insert.xml 2009-08-27 22:50:20 UTC (rev 287824)
@@ -39,6 +39,56 @@
Returns if the array was not empty (an empty array will not be inserted).
</para>
</refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns if the arrays were saved.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example>
+ <title><function>MongoCollection::insert</function> _id example</title>
+ <para>
+ Inserting an object will add an _id field to it, unless it is passed by reference.
+ </para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$a = array('x' => 1);
+$collection->insert($a);
+var_dump($a)
+
+$b = array('x' => 1);
+$ref = &$b;
+$collection->insert($ref);
+var_dump($ref);
+
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+array(2) {
+ ["x"]=>
+ int(1)
+ ["_id"]=>
+ object(MongoId)#4 (0) {
+ }
+}
+array(1) {
+ ["x"]=>
+ int(1)
+}
+]]>
+ </screen>
+ </example>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
Modified: phpdoc/en/trunk/reference/mongo/versions.xml
===================================================================
--- phpdoc/en/trunk/reference/mongo/versions.xml 2009-08-27 22:28:23 UTC (rev 287823)
+++ phpdoc/en/trunk/reference/mongo/versions.xml 2009-08-27 22:50:20 UTC (rev 287824)
@@ -77,6 +77,9 @@
<function name='mongocursor::key' from='PECL mongo >=0.9.0'/>
<function name='mongocursor::count' from='PECL mongo >=0.9.2'/>
<function name='mongocursor::explain' from='PECL mongo >=0.9.2'/>
+ <function name='mongocursor::tailable' from='PECL mongo >=0.9.4'/>
+ <function name='mongocursor::slaveokay' from='PECL mongo >=0.9.4'/>
+ <function name='mongocursor::snapshot' from='PECL mongo >=0.9.4'/>
<!-- MongoGridFS -->
<function name='mongogridfs::__construct' from='PECL mongo >=0.9.0'/>
<function name='mongogridfs::find' from='PECL mongo >=0.9.0'/>
--
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