svn: /phpdoc/en/trunk/reference/mongo/mongo/ construct.xml

From: Date: Wed, 23 Feb 2011 15:31:00 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongo/mongo/ construct.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-7811@lists.php.net to get a copy of this message
kristina Wed, 23 Feb 2011 15:31:00 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=308607 Log: updated constructor params Changed paths: U phpdoc/en/trunk/reference/mongo/mongo/construct.xml Modified: phpdoc/en/trunk/reference/mongo/mongo/construct.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongo/construct.xml 2011-02-23 15:06:07 UTC (rev 308606) +++ phpdoc/en/trunk/reference/mongo/mongo/construct.xml 2011-02-23 15:31:00 UTC (rev 308607) @@ -13,8 +13,6 @@ <methodname>Mongo::__construct</methodname> <methodparam choice="opt"><type>string</type><parameter>server</parameter><initializer>"mongodb://localhost:27017"</initializer></methodparam> <methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>array("connect" => &true;)</initializer></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>persist</parameter><initializer>false</initializer></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>garbage</parameter><initializer>false</initializer></methodparam> </methodsynopsis> <para> If no parameters are passed, this connects to "localhost:27017" (or whatever @@ -51,31 +49,6 @@ to authenticate with. If <literal>db</literal> is not specified, "admin" will be used. </para> - - <para> - If you elect not to connect immediately (you pass the option - <literal>array("connect" => false)</literal>), you will need to call - <function>Mongo::connect</function> before doing any database operations. - </para> - - <informalexample> - <programlisting role="php"> -<![CDATA[ -<?php - -$mongo = new Mongo("mongodb://localhost", array("connect" => false)); - -// throws a MongoException, as $mongo has not been fully initialized yet -$mongo->selectDB("foo")->command(array("distinct" => "bar", "key" => "age")); - -// okay -$mongo->connect(); -$mongo->selectDB("foo")->command(array("distinct" => "bar", "key" => "age")); - -?> -]]> - </programlisting> - </informalexample> </refsect1> <refsect1 role="parameters"> @@ -259,7 +232,7 @@ </entry> </row> <row> - <entry>1.1.4</entry> + <entry>1.2.0</entry> <entry> Added the <literal>username</literal> and <literal>password</literal> options.

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