Fixed close documentation.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325230 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Derick Rethans 2012-04-16 14:19:29 +00:00
parent aa68c1cdff
commit 2f1d7e2f49

View file

@ -14,16 +14,9 @@
<void/>
</methodsynopsis>
<para>
This method does not need to be called, except in unusual
circumstances. The driver will cleanly close the database
connection when this Mongo instance goes out of scope.
</para>
<para>
If objects do not go out of scope between requests, you may wish to call
this method at the end of your program to keep old connections from hanging
around. However, it is probably more efficient use a persistent connection,
which will automatically create a connection if needed and use it for as
many requests as possible.
The <methodname>close</methodname> method forcefully closes a connection to the
database, even if persistent connections are being used. You do under
normal circumstance <emphasis>never</emphasis> have to do this.
</para>
<para>
If you are connected to a replica set, close() will only close the connection
@ -42,6 +35,36 @@
Returns if the connection was successfully closed.
</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.2.0</entry>
<entry>
<para>
Before version 1.2.0 the driver would not use persistent connections
by default, and all connections would be closed as soon as a MongoDB
connection went out if scope. Since version 1.2.0 this is no longer
the case and it is a bad idea to call close as you might end up
overloading the server with connections under high load.
</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables: