svn: /phpdoc/en/trunk/reference/mongo/ mongo/construct.xml mongocollection/count.xml mongocursor/count.xml mongocursor/getquery.xml
mongocursor/info.xml

From: Date: Thu, 23 Sep 2010 15:12:19 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongo/ mongo/construct.xml mongocollection/count.xml mongocursor/count.xml mongocursor/getquery.xml
mongocursor/info.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-7156@lists.php.net to get a copy of this message
kristina Thu, 23 Sep 2010 15:12:19 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303733 Log: clarified cursor count behavior Changed paths: U phpdoc/en/trunk/reference/mongo/mongo/construct.xml U phpdoc/en/trunk/reference/mongo/mongocollection/count.xml U phpdoc/en/trunk/reference/mongo/mongocursor/count.xml D phpdoc/en/trunk/reference/mongo/mongocursor/getquery.xml A + phpdoc/en/trunk/reference/mongo/mongocursor/info.xml (from phpdoc/en/trunk/reference/mongo/mongocursor/getquery.xml:r302818) Modified: phpdoc/en/trunk/reference/mongo/mongo/construct.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongo/construct.xml 2010-09-23 15:08:43 UTC (rev 303732) +++ phpdoc/en/trunk/reference/mongo/mongo/construct.xml 2010-09-23 15:12:19 UTC (rev 303733) @@ -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 @@ 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 Modified: phpdoc/en/trunk/reference/mongo/mongocollection/count.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocollection/count.xml 2010-09-23 15:08:43 UTC (rev 303732) +++ phpdoc/en/trunk/reference/mongo/mongocollection/count.xml 2010-09-23 15:12:19 UTC (rev 303733) @@ -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> Modified: phpdoc/en/trunk/reference/mongo/mongocursor/count.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocursor/count.xml 2010-09-23 15:08:43 UTC (rev 303732) +++ phpdoc/en/trunk/reference/mongo/mongocursor/count.xml 2010-09-23 15:12:19 UTC (rev 303733) @@ -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"> Deleted: phpdoc/en/trunk/reference/mongo/mongocursor/getquery.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocursor/getquery.xml 2010-09-23 15:08:43 UTC (rev 303732) +++ phpdoc/en/trunk/reference/mongo/mongocursor/getquery.xml 2010-09-23 15:12:19 UTC (rev 303733) @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- $Revision$ --> -<refentry xml:id="mongocursor.info" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <refnamediv> - <refname>MongoCursor::info</refname> - <refpurpose>Gets the query, fields, limit, and skip for this cursor</refpurpose> - </refnamediv> - - <refsect1 role="description"> - &reftitle.description; - <methodsynopsis> - <modifier>public</modifier> <type>array</type><methodname>MongoCursor::info</methodname> - <void/> - </methodsynopsis> - <para> - This can be called before or after the query. - </para> - </refsect1> - - <refsect1 role="parameters"> - &reftitle.parameters; - &no.function.parameters; - </refsect1> - - <refsect1 role="returnvalues"> - &reftitle.returnvalues; - <para> - The query, fields, limit, and skip for this cursor as an associative array. - </para> - </refsect1> - - <refsect1 role="examples"> - &reftitle.examples; - <example> - <title><function>MongoCursor::info</function> example</title> - <programlisting role="php"> -<![CDATA[ -<?php - -$m = new Mongo(); -$cursor = $m->foo->bar->find(array("x" => 4), array("y" => false)); -var_dump($cursor->info()); - -?> -]]> - </programlisting> - &example.outputs.similar; - <screen> -<![CDATA[ -array(5) { - ["ns"]=> - string(7) "foo.bar" - ["limit"]=> - int(0) - ["skip"]=> - int(0) - ["query"]=> - array(1) { - ["x"]=> - int(4) - } - ["fields"]=> - array(1) { - ["y"]=> - int(0) - } -} -]]> - </screen> - </example> - </refsect1> - -</refentry> -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:1 -sgml-indent-data:t -sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: -vim600: syn=xml fen fdm=syntax fdl=2 si -vim: et tw=78 syn=sgml -vi: ts=1 sw=1 ---> Copied: phpdoc/en/trunk/reference/mongo/mongocursor/info.xml (from rev 302818, phpdoc/en/trunk/reference/mongo/mongocursor/getquery.xml) =================================================================== --- phpdoc/en/trunk/reference/mongo/mongocursor/info.xml (rev 0) +++ phpdoc/en/trunk/reference/mongo/mongocursor/info.xml 2010-09-23 15:12:19 UTC (rev 303733) @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- $Revision$ --> +<refentry xml:id="mongocursor.info" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>MongoCursor::info</refname> + <refpurpose>Gets the query, fields, limit, and skip for this cursor</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <modifier>public</modifier> <type>array</type><methodname>MongoCursor::info</methodname> + <void/> + </methodsynopsis> + <para> + This can be called before or after the query. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 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> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>MongoCursor::info</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$m = new Mongo(); +$cursor = $m->foo->bar->find(array("x" => 4), array("y" => false)); +var_dump($cursor->info()); + +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +array(5) { + ["ns"]=> + string(7) "foo.bar" + ["limit"]=> + int(0) + ["skip"]=> + int(0) + ["query"]=> + array(1) { + ["x"]=> + int(4) + } + ["fields"]=> + array(1) { + ["y"]=> + int(0) + } +} +]]> + </screen> + </example> + </refsect1> + +</refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +-->

« previous php.doc.cvs (#7156) next »