mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Whitespace
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@276454 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9cbd659da3
commit
bcbd2e8b37
6 changed files with 105 additions and 107 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
|
||||
<book xml:id="book.mongo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Mongo</title>
|
||||
|
@ -8,16 +8,15 @@
|
|||
<preface xml:id="intro.mongo">
|
||||
&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>.
|
||||
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>.
|
||||
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>.
|
||||
</para>
|
||||
</preface>
|
||||
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
|
||||
<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>
|
||||
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>
|
||||
To build, use:
|
||||
<screen>
|
||||
$ cd pecl/mongo
|
||||
$ ./configure --enable-mongo
|
||||
$ make
|
||||
</screen>
|
||||
<table>
|
||||
<title>Options used by configure</title>
|
||||
<tgroup cols="4">
|
||||
|
@ -31,58 +31,58 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>--with-mongodb=/path/to/mongodb</entry>
|
||||
<entry>/usr/local</entry>
|
||||
<entry>Path to local mongodb install</entry>
|
||||
<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>
|
||||
<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>
|
||||
<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.
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
|
||||
<appendix xml:id="mongo.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
|
@ -59,26 +59,25 @@
|
|||
<row>
|
||||
<entry>MONGO_PROFILING_OFF</entry>
|
||||
<entry>
|
||||
Turn off profiling.
|
||||
Turn off profiling.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MONGO_PROFILING_SLOW</entry>
|
||||
<entry>
|
||||
Only keep track of slow operations.
|
||||
Only keep track of slow operations.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>MONGO_PROFILING_ON</entry>
|
||||
<entry>
|
||||
Keep track of all operations.
|
||||
Keep track of all operations.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
|
||||
<chapter xml:id="mongo.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
This example shows how to connect,
|
||||
insert objects, query for objects, iterate through
|
||||
query results, and disconnect from a Mongo database.
|
||||
This example shows how to connect,
|
||||
insert objects, query for objects, iterate through
|
||||
query results, and disconnect from a Mongo database.
|
||||
</para>
|
||||
<example>
|
||||
<title>Mongo Example</title>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<section xml:id="mongo.configuration" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
|
@ -35,51 +35,51 @@
|
|||
</tgroup>
|
||||
</table>
|
||||
&ini.php.constants;
|
||||
</para>
|
||||
</para>
|
||||
|
||||
&ini.descriptions.title;
|
||||
&ini.descriptions.title;
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry xml:id="ini.mongo.default-host">
|
||||
<term>
|
||||
<parameter>mongo.default_host</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry xml:id="ini.mongo.default-host">
|
||||
<term>
|
||||
<parameter>mongo.default_host</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Default hostname. <literal>"localhost"</literal> is recommended.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.mongo.default-port">
|
||||
<term>
|
||||
<parameter>mongo.default_port</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default TCP port number to use when connecting to
|
||||
the database server if no other port is specified. The
|
||||
database's default is <literal>27017</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ini.mongo.default-port">
|
||||
<term>
|
||||
<parameter>mongo.default_port</parameter>
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The default TCP port number to use when connecting to
|
||||
the database server if no other port is specified. The
|
||||
database's default is <literal>27017</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="ini.mongo.auto-reconnect">
|
||||
<term>
|
||||
<parameter>mongo.auto_reconnect</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<varlistentry xml:id="ini.mongo.auto-reconnect">
|
||||
<term>
|
||||
<parameter>mongo.auto_reconnect</parameter>
|
||||
<type>bool</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to reconnect to the database if the connection
|
||||
is lost.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
|
||||
<chapter xml:id="mongo.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
@ -8,8 +8,8 @@
|
|||
&reftitle.required;
|
||||
<!-- Use &no.requirement; if there no requirement -->
|
||||
<para>
|
||||
Requires PHP 5.0 and up.
|
||||
You can download Mongo from &url.mongo;.
|
||||
Requires PHP 5.0 and up.
|
||||
You can download Mongo from &url.mongo;.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Reference in a new issue