clarified cursor count behavior

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@303733 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kristina Chodorow 2010-09-23 15:12:19 +00:00
parent 2ca123129d
commit 24c0366232
4 changed files with 33 additions and 14 deletions

View file

@ -21,7 +21,7 @@
<link linkend="ini.mongo.default-port">mongo.default_port</link>).
</para>
<para>
As of version 1.0.2, <parameter>server</parameter> should have the form:
<parameter>server</parameter> should have the form:
<programlisting>
<![CDATA[
mongodb://[username:password@]host1[:port1][,host2[:port2:],...]/db
@ -50,18 +50,6 @@ mongodb://[username:password@]host1[:port1][,host2[:port2:],...]/db
will be used.
</para>
<warning>
<title><parameter>server</parameter> Format</title>
<para>
Before version 1.0.2, <parameter>server</parameter> could not be prefixed
with <literal>mongodb://</literal>, contain username and password, or
contain more than two hostnames. See the changelog below for more details.
</para>
</warning>
<para>
If you elect not to connect immediately (you pass the option
<literal>array("connect" => false)</literal>), you will need to call

View file

@ -62,6 +62,30 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>1.0.7</entry>
<entry>
Added <literal>limit</literal> and <literal>skip</literal> parameters.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>

View file

@ -13,6 +13,12 @@
<modifier>public</modifier> <type>int</type><methodname>MongoCursor::count</methodname>
<methodparam choice="opt"><type>boolean</type><parameter>foundOnly</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
This method does not affect the state of the cursor: if you haven't queried
yet, you can still apply limits, skips, etc. If you have started iterating
through results, it will not move the current position of the cursor. If you
have exhasted the cursor, it will not reset it.
</para>
</refsect1>
<refsect1 role="parameters">

View file

@ -26,7 +26,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The query, fields, limit, and skip for this cursor as an associative array.
Returns the namespace, limit, skip, query, and fields for this cursor. In
version 1.0.10+, it also returns whether the cursor is pre- or post-query.
</para>
</refsect1>