svn: /phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/ construct.xml tostring.xml
| From: | Jeremy Mikola | Date: | Tue, 10 Nov 2015 21:10:46 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/ construct.xml tostring.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13836@lists.php.net to get a copy of this message | ||
jmikola Tue, 10 Nov 2015 21:10:46 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=338105
Log:
Update MongoDB\Driver\CursorId docs
Changed paths:
U phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/construct.xml
U phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/tostring.xml
Modified: phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/construct.xml
===================================================================
--- phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/construct.xml 2015-11-10 20:52:44 UTC
(rev 338104)
+++ phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/construct.xml 2015-11-10 21:10:46 UTC
(rev 338105)
@@ -4,77 +4,32 @@
<refentry xml:id="mongodb-driver-cursorid.construct" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB\Driver\CursorId::__construct</refname>
- <refpurpose>Description</refpurpose>
+ <refpurpose>Create a new CursorId (not used)</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <modifier>final</modifier> <modifier>public</modifier>
<methodname>MongoDB\Driver\CursorId::__construct</methodname>
-
<methodparam><type>string</type><parameter>id</parameter></methodparam>
+ <modifier>final</modifier> <modifier>private</modifier>
<methodname>MongoDB\Driver\CursorId::__construct</methodname>
+ <void />
</methodsynopsis>
<para>
-
+ <classname>MongoDB\Driver\CursorId</classname> objects are returned from
+ <function>MongoDB\Driver\Cursor::getId</function> and cannot be constructed
+ directly.
</para>
-
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
- <variablelist>
- <varlistentry>
- <term><parameter>id</parameter></term>
- <listitem>
- <para>
-
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ &no.function.parameters;
</refsect1>
- <refsect1 role="returnvalues">
- &reftitle.returnvalues;
- <para>
-
- </para>
- </refsect1>
- <refsect1 role="errors">
- &reftitle.errors;
- <para>
-
- </para>
- </refsect1>
-
-
- <refsect1 role="examples">
- &reftitle.examples;
- <example>
- <title><function>MongoDB\Driver\CursorId::__construct</function>
example</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-
-/* ... */
-
-?>
-]]>
- </programlisting>
- &example.outputs.similar;
- <screen>
-<![CDATA[
-...
-]]>
- </screen>
- </example>
- </refsect1>
-
-
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
- <member></member>
+ <member><function>MongoDB\Driver\Cursor::getId</function></member>
</simplelist>
</refsect1>
Modified: phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/tostring.xml
===================================================================
--- phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/tostring.xml 2015-11-10 20:52:44 UTC
(rev 338104)
+++ phpdoc/en/trunk/reference/mongodb/mongodb/driver/cursorid/tostring.xml 2015-11-10 21:10:46 UTC
(rev 338105)
@@ -4,19 +4,18 @@
<refentry xml:id="mongodb-driver-cursorid.tostring" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB\Driver\CursorId::__toString</refname>
- <refpurpose>Description</refpurpose>
+ <refpurpose>String representation of the cursor ID</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <modifier>final</modifier> <modifier>public</modifier>
<type>ReturnType</type><methodname>MongoDB\Driver\CursorId::__toString</methodname>
+ <modifier>final</modifier> <modifier>public</modifier>
<type>string</type><methodname>MongoDB\Driver\CursorId::__toString</methodname>
<void />
</methodsynopsis>
<para>
-
+ Returns the <type>string</type> representation of the cursor ID.
</para>
-
</refsect1>
<refsect1 role="parameters">
@@ -27,15 +26,15 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
-
+ Returns the <type>string</type> representation of the cursor ID.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
- <para>
-
- </para>
+ <simplelist>
+ &mongodb.throws.argumentparsing;
+ </simplelist>
</refsect1>
@@ -47,15 +46,28 @@
<![CDATA[
<?php
-/* ... */
+/* In this example, we insert several documents into the collection and specify
+ * a smaller batchSize to ensure that the first batch contains only a subset of
+ * our results and the cursor remains open on the server. */
+$manager = new MongoDB\Driver\Manager("mongodb://localhost:27017");
+$query = new MongoDB\Driver\Query([], ['batchSize' => 2]);
+$bulk = new MongoDB\Driver\BulkWrite;
+$bulk->insert(['x' => 1]);
+$bulk->insert(['x' => 2]);
+$bulk->insert(['x' => 3]);
+$manager->executeBulkWrite('db.collection', $bulk);
+
+$cursor = $manager->executeQuery('db.collection', $query);
+var_dump((string) $cursor->getId());
+
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
-...
+string(11) "98061641158"
]]>
</screen>
</example>
@@ -65,7 +77,7 @@
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
- <member></member>
+ <member><function>MongoDB\Driver\Cursor::getId</function></member>
</simplelist>
</refsect1>