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

From: Date: Wed, 07 Nov 2012 14:56:31 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongo/ connecting.xml mongo/construct.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-10666@lists.php.net to get a copy of this message
derick Wed, 07 Nov 2012 14:56:31 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=328269 Log: Clarify delayed connections. Changed paths: U phpdoc/en/trunk/reference/mongo/connecting.xml U phpdoc/en/trunk/reference/mongo/mongo/construct.xml Modified: phpdoc/en/trunk/reference/mongo/connecting.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/connecting.xml 2012-11-07 14:44:04 UTC (rev 328268) +++ phpdoc/en/trunk/reference/mongo/connecting.xml 2012-11-07 14:56:31 UTC (rev 328269) @@ -24,13 +24,11 @@ <programlisting role="php"> <![CDATA[ <?php - -// Specifying the username and password in the connection URI +// Specifying the username and password in the connection URI (preferred) $m = new Mongo("mongodb://${username}:${password}@localhost"); -// Specifying the username and password via the options array +// Specifying the username and password via the options array (alternative) $m = new Mongo("mongodb://localhost", array("username" => $username, "password" => $password)); - ?> ]]> </programlisting> @@ -43,14 +41,11 @@ <programlisting role="php"> <![CDATA[ <?php - -// Specifying the authentication database in the connection URI +// Specifying the authentication database in the connection URI (preferred) $m = new Mongo("mongodb://${username}:${password}@localhost/myDatabase"); -// Specifying the authentication database via the options array - +// Specifying the authentication database via the options array (alternative) $m = new Mongo("mongodb://${username}:${password}@localhost", array("db" => "myDatabase")); - ?> ]]> </programlisting> @@ -70,13 +65,14 @@ <programlisting role="php"> <![CDATA[ <?php +// Using multiple servers as the seed list (prefered) +$m = new Mongo("mongodb://rs1.example.com:27017,rs2.example.com:27017/?replicaSet=myReplSetName")); // Using one server as the seed list $m = new Mongo("mongodb://rs1.example.com:27017", array("replicaSet" => "myReplSetName")); // Using multiple servers as the seed list $m = new Mongo("mongodb://rs1.example.com:27017,rs2.example.com:27017", array("replicaSet" => "myReplSetName")); - ?> ]]> </programlisting> @@ -158,9 +154,7 @@ <programlisting role="php"> <![CDATA[ <?php - $m = new Mongo("mongodb:///tmp/mongo-27017.sock"); - ?> ]]> </programlisting> @@ -174,9 +168,7 @@ <programlisting role="php"> <![CDATA[ <?php - $m = new Mongo("mongodb://username:password@/tmp/mongo-27017.sock:0/foo"); - ?> ]]> </programlisting> @@ -184,7 +176,7 @@ </section> <section> - <title>Connection Pooling (version 1.2.0+)</title> + <title>Connection Pooling (version 1.2.0-1.2.12 *only*)</title> <para> Creating connections is one of the most heavyweight things that the driver does. It can take hundreds of milliseconds to set up a connection correctly, @@ -292,8 +284,9 @@ <note> <para> This section is not relevant for 1.2.0+. In 1.2.0+, connections are always - persistent and managed automatically by the driver. See - <classname>MongoPool</classname> for more information on pooling. + persistent and managed automatically by the driver. If you are using a + 1.2.x release, see <classname>MongoPool</classname> for more information on + pooling. </para> </note> Modified: phpdoc/en/trunk/reference/mongo/mongo/construct.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongo/construct.xml 2012-11-07 14:44:04 UTC (rev 328268) +++ phpdoc/en/trunk/reference/mongo/mongo/construct.xml 2012-11-07 14:56:31 UTC (rev 328269) @@ -91,7 +91,10 @@ </para> <para> If the constructor should connect before returning. Default is - &true;. + &true;. When set to &false; the driver will + <emphasis>automatically</emphasis> connection to the server whenever + it is necessary to do a query. Alternatively, you can run + <methodname>Mongo::connect</methodname> manually. </para> <warning> <para>

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