mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added Cursor::immortal, removed util
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@291003 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
5e7bc35a13
commit
f3a6558244
5 changed files with 102 additions and 128 deletions
84
reference/mongo/mongocursor/immortal.xml
Normal file
84
reference/mongo/mongocursor/immortal.xml
Normal file
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Revision: $ -->
|
||||
<refentry xml:id="mongocursor.immortal" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoCursor::immortal</refname>
|
||||
<refpurpose>Sets whether this cursor will timeout</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>MongoCursor</type><methodname>MongoCursor::immortal</methodname>
|
||||
<methodparam choice="opt"><type>boolean</type><parameter>liveForever</parameter><initializer>true</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
After remaining idle for some amount of time, cursor, by default, "die."
|
||||
This is generally the behavior one wants. The database cleans up a cursor
|
||||
once all of its results have been sent to the client, but if the client
|
||||
doesn't request all of the results, the cursor will languish there, taking up
|
||||
resources. Thus, after a few minutes, the cursor "times out" and the
|
||||
database assumes the client has gotten everything it needs and cleans up its
|
||||
the cursor's resources.
|
||||
</para>
|
||||
<para>
|
||||
If, for some reason, you need a cursor to hang around for a long time, you
|
||||
can prevent the database from cleaning it up by using this method. However,
|
||||
if you make a cursor immortal, you need to iterate through all of its results
|
||||
(or at least until <function>Cursor::dead</function> returns &true;) or the
|
||||
cursor will hang around the database forever, taking up resources.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>liveForever</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the cursor should be immortal.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns this cursor.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Throws MongoCursorException if this cursor has started iterating.
|
||||
</para>
|
||||
</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
|
||||
-->
|
|
@ -11,9 +11,13 @@
|
|||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <modifier>static</modifier> <type>array</type><methodname>MongoDBRef::create</methodname>
|
||||
<methodparam><type>string</type><parameter>ns</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>collection</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>id</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>database</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
If no database is given, the current database is used.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -22,11 +26,11 @@
|
|||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>ns</parameter>
|
||||
<parameter>collection</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Database and collection name.
|
||||
Collection name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -40,6 +44,16 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>database</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Database name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Revision$ -->
|
||||
<phpdoc:classref xml:id="class.mongoutil" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<title>The MongoUtil class</title>
|
||||
<titleabbrev>MongoUtil</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ Mongoutil intro -->
|
||||
<section xml:id="mongoutil.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
Some handy functions used by the other classes.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="mongoutil.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>MongoUtil</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>MongoUtil</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongoutil')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.mongo.entities.mongoutil;
|
||||
|
||||
</phpdoc:classref>
|
||||
|
||||
<!-- 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
|
||||
indent-tabs-mode:nil
|
||||
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
|
||||
-->
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Revision$ -->
|
||||
<refentry xml:id="mongoutil.toindexstring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoUtil::toIndexString</refname>
|
||||
<refpurpose>Converts a field or array of fields into an underscore-separated string</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <modifier>static</modifier> <type>string</type><methodname>MongoUtil::toIndexString</methodname>
|
||||
<methodparam><type>string|array</type><parameter>keys</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>keys</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Field(s) to convert.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the index name.
|
||||
</para>
|
||||
</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
|
||||
-->
|
|
@ -81,6 +81,7 @@
|
|||
<function name='mongocursor::slaveokay' from='PECL mongo >=0.9.4'/>
|
||||
<function name='mongocursor::snapshot' from='PECL mongo >=0.9.4'/>
|
||||
<function name='mongocursor::dead' from='PECL mongo >=0.9.6'/>
|
||||
<function name='mongocursor::immortal' from='PECL mongo >=1.0.1'/>
|
||||
<!-- MongoGridFS -->
|
||||
<function name='mongogridfs::__construct' from='PECL mongo >=0.9.0'/>
|
||||
<function name='mongogridfs::find' from='PECL mongo >=0.9.0'/>
|
||||
|
|
Loading…
Reference in a new issue