mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
updated doc
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@277704 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
17a8778249
commit
d6c3010661
16 changed files with 834 additions and 94 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
|
||||
<book xml:id="book.mongo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Mongo</title>
|
||||
|
@ -9,20 +9,35 @@
|
|||
&reftitle.intro;
|
||||
<para>
|
||||
These functions allow PHP to interact with Mongo database servers.
|
||||
It is highly recommended that you not use these functions. They are
|
||||
wrapped by an object-oriented interface, which has a much nicer and
|
||||
well-documented <link xlink:href="http://www.mongodb.org/">API</link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
More information and downloads for Mongo can be found at
|
||||
&url.mongo;. PHP-specific information can be found at the
|
||||
<link xlink:href="http://www.mongodb.org">PHP Language Center</link>.
|
||||
MongoDB is a high-performance, open source, schema-free document database
|
||||
designed for cloud computing. The project's goal is a cloud-scale data store
|
||||
that's easy to deploy, manage and use. It's network accessible and written in
|
||||
C++.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
More information and downloads for Mongo can be found at &url.mongodb;.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are also tutorials at &url.mongodb.php;.
|
||||
</para>
|
||||
|
||||
</preface>
|
||||
|
||||
&reference.mongo.setup;
|
||||
&reference.mongo.constants;
|
||||
&reference.mongo.examples;
|
||||
|
||||
&reference.mongo.mongocode;
|
||||
&reference.mongo.mongoid;
|
||||
&reference.mongo.mongodate;
|
||||
&reference.mongo.mongoregex;
|
||||
&reference.mongo.mongobindata;
|
||||
|
||||
&reference.mongo.reference;
|
||||
|
||||
</book>
|
||||
|
|
|
@ -1,88 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
|
||||
<section xml:id="mongo.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.install;
|
||||
<!-- There are various PECL related entities in language-snippets.ent -->
|
||||
<para>
|
||||
To get the source:
|
||||
<screen>
|
||||
$ cvs -d :pserver:cvsread@cvs.php.net:/repository checkout pecl/mongo
|
||||
# password: phpfi
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To build, use:
|
||||
<screen>
|
||||
$ cd pecl/mongo
|
||||
$ ./configure --enable-mongo
|
||||
$ make
|
||||
</screen>
|
||||
<table>
|
||||
<title>Options used by configure</title>
|
||||
<tgroup cols="4">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Option</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>--with-mongodb=/path/to/mongodb</entry>
|
||||
<entry>/usr/local</entry>
|
||||
<entry>Path to local mongodb install</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>--with-boost=/path/to/boost/libs</entry>
|
||||
<entry>/usr/lib/</entry>
|
||||
<entry>Path to boost libraries</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>--enable-64</entry>
|
||||
<entry>no</entry>
|
||||
<entry>Compile for 64-bit architecture</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note for Mac OS X users: Web Sharing uses 64-bit PHP, however, the command line PHP uses 32-bit.
|
||||
Therefore, you have to use --enable-64 to force command-line PHP to build an Apache-compliant
|
||||
PHP extension.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To install:
|
||||
<screen>
|
||||
$ sudo cp modules/mongo.so /path/to/extension_dir
|
||||
$ sudo cp src/php/* /path/to/php/includes/mongo/
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
php.ini settings:
|
||||
To load this extension on startup, add a line:
|
||||
<screen>
|
||||
extension=mongo.so
|
||||
</screen>
|
||||
|
||||
You should also add some default settings:
|
||||
<screen>
|
||||
[mongo]
|
||||
; Default host for mongo connection
|
||||
mongo.default_host = localhost
|
||||
|
||||
; Default port for mongo database
|
||||
mongo.default_port = 27017
|
||||
|
||||
; If the driver should reconnect to mongo
|
||||
mongo.auto_reconnect = true
|
||||
</screen>
|
||||
&pecl.moved;
|
||||
&pecl.info;
|
||||
<link xlink:href="&url.pecl.package;mongo">&url.pecl.package;mongo</link>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
|
||||
<appendix xml:id="mongo.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
|
@ -45,7 +45,7 @@
|
|||
</para>
|
||||
|
||||
<para>
|
||||
The following constants are for setting up database profiling.
|
||||
The following constants are for setting up database profiling.
|
||||
<table>
|
||||
<title>Mongo Profiling Constants</title>
|
||||
<tgroup cols="2">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<section xml:id="mongo.configuration" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
|
@ -29,7 +29,22 @@
|
|||
<row>
|
||||
<entry><link linkend="ini.mongo.auto-reconnect">mongo.auto_reconnect</link></entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.mongo.allow-persistent">mongo.allow_persistent</link></entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.mongo.max-persistent">mongo.max_persistent</link></entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><link linkend="ini.mongo.max-connections">mongo.max_connections</link></entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>PHP_INI_SYSTEM</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
|
@ -79,6 +94,45 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.mongo.allow-persistent">
|
||||
<term>
|
||||
<parameter>mongo.allow_persistent</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If persistent connections are allowed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.mongo.max-persistent">
|
||||
<term>
|
||||
<parameter>mongo.max_persistent</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of simultaneous persistent connections to allow.
|
||||
-1 allows unlimited persistent connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.mongo.max-connections">
|
||||
<term>
|
||||
<parameter>mongo.max_connections</parameter>
|
||||
<type>int</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of simultaneous connections to allow.
|
||||
-1 allows unlimited connections.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
|
|
67
reference/mongo/mongobindata.xml
Normal file
67
reference/mongo/mongobindata.xml
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.mongobindata" 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 MongoBinData class</title>
|
||||
<titleabbrev>MongoBinData</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ MongoBinData intro -->
|
||||
<section xml:id="mongobindata.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
An object that can be used to store or retreive binary data from the database.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="mongobindata.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>MongoBinData</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>MongoBinData</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongobindata')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.mongo.entities.mongobindata;
|
||||
|
||||
</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:"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
|
||||
-->
|
78
reference/mongo/mongobindata/construct.xml
Normal file
78
reference/mongo/mongobindata/construct.xml
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="mongobindata.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoBinData::__construct</refname>
|
||||
<refpurpose>Creates a new binary data object.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>MongoBinData::__construct</methodname>
|
||||
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Creates a new binary data object.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>data</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Binary data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>int</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Data type.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a new binary data object.
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../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
|
||||
-->
|
53
reference/mongo/mongobindata/tostring.xml
Normal file
53
reference/mongo/mongobindata/tostring.xml
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="mongobindata.tostring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoBinData::__toString</refname>
|
||||
<refpurpose>The string representation of this binary data object.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>MongoBinData::__toString</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the string representing this binary data object.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This byte array.
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../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
|
||||
-->
|
67
reference/mongo/mongodate.xml
Normal file
67
reference/mongo/mongodate.xml
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.mongodate" 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 MongoDate class</title>
|
||||
<titleabbrev>MongoDate</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ Mongodate intro -->
|
||||
<section xml:id="mongodate.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
Represent date objects for the database.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="mongodate.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>MongoDate</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>MongoDate</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodate')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.mongo.entities.mongodate;
|
||||
|
||||
</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:"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
|
||||
-->
|
105
reference/mongo/mongodate/construct.xml
Normal file
105
reference/mongo/mongodate/construct.xml
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="mongodate.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoDate::__construct</refname>
|
||||
<refpurpose>Creates a new date.</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>MongoDate::__construct</methodname>
|
||||
<methodparam choice="opt"><type>long</type><parameter>secs</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Creates a new date. If no parameter is given, the current time is used.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>secs</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of seconds since January 1st, 1970.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the new date.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>MongoDate::__construct</function> example</title>
|
||||
<para>This example demonstrates creating a new date with the current time and a new date with a given time.</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$d = new MongoDate();
|
||||
echo "$d\n";
|
||||
$d = new MongoDate(1234567890);
|
||||
echo "$d\n";
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
0.23660600 1235685067
|
||||
0.00000000 1234567890
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>MongoDate::__toString</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../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
|
||||
-->
|
53
reference/mongo/mongodate/tostring.xml
Normal file
53
reference/mongo/mongodate/tostring.xml
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="mongodate.tostring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoDate::__toString</refname>
|
||||
<refpurpose>Returns a string representation of this date</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>MongoDate::__toString</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string representation of this date, similar to the representation returned by microtime().
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This date.
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../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
|
||||
-->
|
67
reference/mongo/mongoid.xml
Normal file
67
reference/mongo/mongoid.xml
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.mongoid" 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 MongoId class</title>
|
||||
<titleabbrev>MongoId</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ MongoId intro -->
|
||||
<section xml:id="mongoid.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
A unique identifier created for database objects.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="mongoid.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>MongoId</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>MongoId</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongoid')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.mongo.entities.mongoid;
|
||||
|
||||
</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:"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
|
||||
-->
|
67
reference/mongo/mongoregex.xml
Normal file
67
reference/mongo/mongoregex.xml
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.mongoregex" 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 MongoRegex class</title>
|
||||
<titleabbrev>MongoRegex</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ MongoRegex intro -->
|
||||
<section xml:id="mongoregex.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
This class can be used to interact with regular expression fetched from the database and in order to put regular expression in the database.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="mongoregex.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>MongoRegex</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>MongoRegex</classname>
|
||||
</ooclass>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongoregex')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.mongo.entities.mongoregex;
|
||||
|
||||
</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:"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
|
||||
-->
|
95
reference/mongo/mongoregex/construct.xml
Normal file
95
reference/mongo/mongoregex/construct.xml
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="mongoregex.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoRegex::__construct</refname>
|
||||
<refpurpose>Creates a new regular expression</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<methodname>MongoRegex::__construct</methodname>
|
||||
<methodparam><type>string</type><parameter>regex</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Creates a new regular expression.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>regex</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Regular expression string of the form /expr/flags.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a new regular expression.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>MongoRegex::__construct</function> example</title>
|
||||
<para>This example uses a regular expression to query for all documents with a username field matching a regular expression.</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$joe_search = new MongoRegex("/j[o0]e/i");
|
||||
$cursor = $collection->find(array("username" => $joe_search));
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><methodname>MongoRegex::__toString</methodname></member>
|
||||
</simplelist>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../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
|
||||
-->
|
82
reference/mongo/mongoregex/tostring.xml
Normal file
82
reference/mongo/mongoregex/tostring.xml
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="mongoregex.tostring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoRegex::__toString</refname>
|
||||
<refpurpose>A string representation of this regular expression</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <type>string</type><methodname>MongoRegex::__toString</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns a string representation of this regular expression.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This regular expression in the form "/expr/flags".
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>MongoRegex::__toString</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$r = new MongoRegex( "/[a-fA-F0-9]{16}/g" );
|
||||
echo $r->regex . "\n";
|
||||
echo $r->flags . "\n";
|
||||
echo "$r\n";
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
[a-fA-F0-9]{16}
|
||||
g
|
||||
/[a-fA-F0-9]{16}/g
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../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,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
|
||||
<chapter xml:id="mongo.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
@ -9,7 +9,7 @@
|
|||
<!-- Use &no.requirement; if there no requirement -->
|
||||
<para>
|
||||
Requires PHP 5.0 and up.
|
||||
You can download Mongo from &url.mongo;.
|
||||
You can download MongoDB from &url.mongodb;.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!--
|
||||
Do NOT translate this file
|
||||
-->
|
||||
|
@ -29,8 +29,21 @@
|
|||
<function name='mongo_gridchunk_data' from='PECL mongo >= 0.8.0'/>
|
||||
|
||||
<!-- Methods -->
|
||||
<!-- MongoId -->
|
||||
<function name='mongoid::__construct' from='PECL mongo >= 0.8.0'/>
|
||||
<function name='mongoid::__tostring' from='PECL mongo >= 0.8.0'/>
|
||||
<!-- MongoRegex -->
|
||||
<function name='mongoregex::__construct' from='PECL mongo >= 0.8.1'/>
|
||||
<function name='mongoregex::__tostring' from='PECL mongo >= 0.8.1'/>
|
||||
<!-- MongoDate -->
|
||||
<function name='mongodate::__construct' from='PECL mongo >= 0.8.1'/>
|
||||
<function name='mongodate::__tostring' from='PECL mongo >= 0.8.1'/>
|
||||
<!-- MongoBinData -->
|
||||
<function name='mongobindata::__construct' from='PECL mongo >= 0.8.1'/>
|
||||
<function name='mongobindata::__tostring' from='PECL mongo >= 0.8.1'/>
|
||||
<!-- MongoCode -->
|
||||
<function name='mongocode::__construct' from='PECL mongo >= 0.8.3'/>
|
||||
<function name='mongocode::__tostring' from='PECL mongo >= 0.8.3'/>
|
||||
</versions>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue