added example and "see also" section

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@313080 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kristina Chodorow 2011-07-08 21:02:27 +00:00
parent 4ce64bd3ca
commit ade1d64161

View file

@ -6,26 +6,74 @@
<refname>Mongo::getPoolSize</refname>
<refpurpose>Get pool size for connection pools</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>int</type><methodname>Mongo::getPoolSize</methodname>
<modifier>public</modifier> <modifier>static</modifier> <type>int</type><methodname>Mongo::getPoolSize</methodname>
<void/>
</methodsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the current pool size.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title>Changing pool size</title>
<para>
This returns the default pool size, sets a new pool size, then prints the
new pool size and the pool debugging information. Note that changing the
pool size only affects new connection pools, it does not change old ones.
</para>
<programlisting role="php">
<![CDATA[
<?php
$connection = new Mongo("host1");
// pool size is -1
echo "pool size is: ".Mongo::getPoolSize()."\n";
echo "setting pool size to 200\n";
Mongo::setPoolSize(200);
// pool size is 200
echo "pool size is: ".Mongo::getPoolSize()."\n";
$conn2 = new Mongo("host2");
// remaining for host1 is -2
// remaining for host2 is 199
var_dump(Mongo::poolDebug());
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1 role="seealso"><!-- {{{ -->
&reftitle.seealso;
<para>
<simplelist>
<member><function>Mongo::setPoolSize</function></member>
<member><function>Mongo::poolDebug</function></member>
<member>The <link linkend="mongo.connecting">connection</link> documentation.</member>
</simplelist>
</para>
</refsect1><!-- }}} -->
</refentry>
<!-- Keep this comment at the end of the file
Local variables: