From d6c3010661f6a0ff56e8cfa21f662d9954dd7bfc Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Tue, 24 Mar 2009 18:46:00 +0000 Subject: [PATCH] updated doc git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@277704 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/book.xml | 29 ++++-- reference/mongo/configure.xml | 84 +---------------- reference/mongo/constants.xml | 4 +- reference/mongo/ini.xml | 58 +++++++++++- reference/mongo/mongobindata.xml | 67 +++++++++++++ reference/mongo/mongobindata/construct.xml | 78 +++++++++++++++ reference/mongo/mongobindata/tostring.xml | 53 +++++++++++ reference/mongo/mongodate.xml | 67 +++++++++++++ reference/mongo/mongodate/construct.xml | 105 +++++++++++++++++++++ reference/mongo/mongodate/tostring.xml | 53 +++++++++++ reference/mongo/mongoid.xml | 67 +++++++++++++ reference/mongo/mongoregex.xml | 67 +++++++++++++ reference/mongo/mongoregex/construct.xml | 95 +++++++++++++++++++ reference/mongo/mongoregex/tostring.xml | 82 ++++++++++++++++ reference/mongo/setup.xml | 4 +- reference/mongo/versions.xml | 15 ++- 16 files changed, 834 insertions(+), 94 deletions(-) create mode 100644 reference/mongo/mongobindata.xml create mode 100644 reference/mongo/mongobindata/construct.xml create mode 100644 reference/mongo/mongobindata/tostring.xml create mode 100644 reference/mongo/mongodate.xml create mode 100644 reference/mongo/mongodate/construct.xml create mode 100644 reference/mongo/mongodate/tostring.xml create mode 100644 reference/mongo/mongoid.xml create mode 100644 reference/mongo/mongoregex.xml create mode 100644 reference/mongo/mongoregex/construct.xml create mode 100644 reference/mongo/mongoregex/tostring.xml diff --git a/reference/mongo/book.xml b/reference/mongo/book.xml index b7962ac722..6161a7ff7a 100644 --- a/reference/mongo/book.xml +++ b/reference/mongo/book.xml @@ -1,5 +1,5 @@ - + Mongo @@ -9,20 +9,35 @@ &reftitle.intro; 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 API. + - More information and downloads for Mongo can be found at - &url.mongo;. PHP-specific information can be found at the - PHP Language Center. + 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++. + + + More information and downloads for Mongo can be found at &url.mongodb;. + + + + There are also tutorials at &url.mongodb.php;. + + &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; diff --git a/reference/mongo/configure.xml b/reference/mongo/configure.xml index 78a36ac0f4..f5bed76ae3 100644 --- a/reference/mongo/configure.xml +++ b/reference/mongo/configure.xml @@ -1,88 +1,12 @@ - +
&reftitle.install; - - To get the source: - - $ cvs -d :pserver:cvsread@cvs.php.net:/repository checkout pecl/mongo - # password: phpfi - - - - - To build, use: - - $ cd pecl/mongo - $ ./configure --enable-mongo - $ make - - - Options used by configure - - - - Option - Default - Description - - - - - --with-mongodb=/path/to/mongodb - /usr/local - Path to local mongodb install - - - --with-boost=/path/to/boost/libs - /usr/lib/ - Path to boost libraries - - - --enable-64 - no - Compile for 64-bit architecture - - - -
-
- - - 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. - - - - To install: - - $ sudo cp modules/mongo.so /path/to/extension_dir - $ sudo cp src/php/* /path/to/php/includes/mongo/ - - - - - php.ini settings: - To load this extension on startup, add a line: - - extension=mongo.so - - - You should also add some default settings: - - [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 - + &pecl.moved; + &pecl.info; + &url.pecl.package;mongo.
diff --git a/reference/mongo/constants.xml b/reference/mongo/constants.xml index 339dadf42f..82e35616d2 100644 --- a/reference/mongo/constants.xml +++ b/reference/mongo/constants.xml @@ -1,5 +1,5 @@ - + &reftitle.constants; @@ -45,7 +45,7 @@ - The following constants are for setting up database profiling. + The following constants are for setting up database profiling. Mongo Profiling Constants diff --git a/reference/mongo/ini.xml b/reference/mongo/ini.xml index d7dbfa3f6c..cb8f3f2b81 100644 --- a/reference/mongo/ini.xml +++ b/reference/mongo/ini.xml @@ -1,5 +1,5 @@ - +
&reftitle.runtime; &extension.runtime; @@ -29,7 +29,22 @@ mongo.auto_reconnect NULL - PHP_INI_ALL + PHP_INI_SYSTEM + + + mongo.allow_persistent + NULL + PHP_INI_SYSTEM + + + mongo.max_persistent + NULL + PHP_INI_SYSTEM + + + mongo.max_connections + NULL + PHP_INI_SYSTEM @@ -79,6 +94,45 @@ + + + + mongo.allow_persistent + bool + + + + If persistent connections are allowed. + + + + + + + mongo.max_persistent + int + + + + The number of simultaneous persistent connections to allow. + -1 allows unlimited persistent connections. + + + + + + + mongo.max_connections + int + + + + The number of simultaneous connections to allow. + -1 allows unlimited connections. + + + +
diff --git a/reference/mongo/mongobindata.xml b/reference/mongo/mongobindata.xml new file mode 100644 index 0000000000..5ad454288c --- /dev/null +++ b/reference/mongo/mongobindata.xml @@ -0,0 +1,67 @@ + + + + + + The MongoBinData class + MongoBinData + + + + +
+ &reftitle.intro; + + An object that can be used to store or retreive binary data from the database. + +
+ + +
+ &reftitle.classsynopsis; + + + + MongoBinData + + + + + MongoBinData + + + + + Methods + + + + +
+ +
+ + &reference.mongo.entities.mongobindata; + +
+ + diff --git a/reference/mongo/mongobindata/construct.xml b/reference/mongo/mongobindata/construct.xml new file mode 100644 index 0000000000..d55b9de206 --- /dev/null +++ b/reference/mongo/mongobindata/construct.xml @@ -0,0 +1,78 @@ + + + + + + MongoBinData::__construct + Creates a new binary data object. + + + + &reftitle.description; + + MongoBinData::__construct + stringdata + inttype + + + Creates a new binary data object. + + + + + &reftitle.parameters; + + + + + data + + + + Binary data. + + + + + + int + + + + Data type. + + + + + + + + + &reftitle.returnvalues; + + Returns a new binary data object. + + + + + + diff --git a/reference/mongo/mongobindata/tostring.xml b/reference/mongo/mongobindata/tostring.xml new file mode 100644 index 0000000000..2e674942f2 --- /dev/null +++ b/reference/mongo/mongobindata/tostring.xml @@ -0,0 +1,53 @@ + + + + + + MongoBinData::__toString + The string representation of this binary data object. + + + + &reftitle.description; + + public stringMongoBinData::__toString + + + + Returns the string representing this binary data object. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + This byte array. + + + + + diff --git a/reference/mongo/mongodate.xml b/reference/mongo/mongodate.xml new file mode 100644 index 0000000000..60de361a51 --- /dev/null +++ b/reference/mongo/mongodate.xml @@ -0,0 +1,67 @@ + + + + + + The MongoDate class + MongoDate + + + + +
+ &reftitle.intro; + + Represent date objects for the database. + +
+ + +
+ &reftitle.classsynopsis; + + + + MongoDate + + + + + MongoDate + + + + + Methods + + + + +
+ +
+ + &reference.mongo.entities.mongodate; + +
+ + diff --git a/reference/mongo/mongodate/construct.xml b/reference/mongo/mongodate/construct.xml new file mode 100644 index 0000000000..d6734ddb0b --- /dev/null +++ b/reference/mongo/mongodate/construct.xml @@ -0,0 +1,105 @@ + + + + + + MongoDate::__construct + Creates a new date. + + + + &reftitle.description; + + MongoDate::__construct + longsecs + + + Creates a new date. If no parameter is given, the current time is used. + + + + + &reftitle.parameters; + + + + + secs + + + + Number of seconds since January 1st, 1970. + + + + + + + + + &reftitle.returnvalues; + + Returns the new date. + + + + + &reftitle.examples; + + + <function>MongoDate::__construct</function> example + This example demonstrates creating a new date with the current time and a new date with a given time. + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + MongoDate::__toString + + + + + + + diff --git a/reference/mongo/mongodate/tostring.xml b/reference/mongo/mongodate/tostring.xml new file mode 100644 index 0000000000..a6b8f67f78 --- /dev/null +++ b/reference/mongo/mongodate/tostring.xml @@ -0,0 +1,53 @@ + + + + + + MongoDate::__toString + Returns a string representation of this date + + + + &reftitle.description; + + public stringMongoDate::__toString + + + + Returns a string representation of this date, similar to the representation returned by microtime(). + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + This date. + + + + + diff --git a/reference/mongo/mongoid.xml b/reference/mongo/mongoid.xml new file mode 100644 index 0000000000..c19e17f53a --- /dev/null +++ b/reference/mongo/mongoid.xml @@ -0,0 +1,67 @@ + + + + + + The MongoId class + MongoId + + + + +
+ &reftitle.intro; + + A unique identifier created for database objects. + +
+ + +
+ &reftitle.classsynopsis; + + + + MongoId + + + + + MongoId + + + + + Methods + + + + +
+ +
+ + &reference.mongo.entities.mongoid; + +
+ + diff --git a/reference/mongo/mongoregex.xml b/reference/mongo/mongoregex.xml new file mode 100644 index 0000000000..57f61444bf --- /dev/null +++ b/reference/mongo/mongoregex.xml @@ -0,0 +1,67 @@ + + + + + + The MongoRegex class + MongoRegex + + + + +
+ &reftitle.intro; + + This class can be used to interact with regular expression fetched from the database and in order to put regular expression in the database. + +
+ + +
+ &reftitle.classsynopsis; + + + + MongoRegex + + + + + MongoRegex + + + + + Methods + + + + +
+ +
+ + &reference.mongo.entities.mongoregex; + +
+ + diff --git a/reference/mongo/mongoregex/construct.xml b/reference/mongo/mongoregex/construct.xml new file mode 100644 index 0000000000..865a79e226 --- /dev/null +++ b/reference/mongo/mongoregex/construct.xml @@ -0,0 +1,95 @@ + + + + + + MongoRegex::__construct + Creates a new regular expression + + + + &reftitle.description; + + MongoRegex::__construct + stringregex + + + Creates a new regular expression. + + + + + &reftitle.parameters; + + + + + regex + + + + Regular expression string of the form /expr/flags. + + + + + + + + + &reftitle.returnvalues; + + Returns a new regular expression. + + + + + &reftitle.examples; + + + <function>MongoRegex::__construct</function> example + This example uses a regular expression to query for all documents with a username field matching a regular expression. + +find(array("username" => $joe_search)); + +?> +]]> + + + + + + + &reftitle.seealso; + + + MongoRegex::__toString + + + + + + diff --git a/reference/mongo/mongoregex/tostring.xml b/reference/mongo/mongoregex/tostring.xml new file mode 100644 index 0000000000..28ce182e97 --- /dev/null +++ b/reference/mongo/mongoregex/tostring.xml @@ -0,0 +1,82 @@ + + + + + + MongoRegex::__toString + A string representation of this regular expression + + + + &reftitle.description; + + public stringMongoRegex::__toString + + + + Returns a string representation of this regular expression. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + This regular expression in the form "/expr/flags". + + + + + &reftitle.examples; + + + <function>MongoRegex::__toString</function> example + +regex . "\n"; +echo $r->flags . "\n"; +echo "$r\n"; + +?> +]]> + + &example.outputs.similar; + + + + + + + + + diff --git a/reference/mongo/setup.xml b/reference/mongo/setup.xml index 025e5140b6..7c1a0b424c 100644 --- a/reference/mongo/setup.xml +++ b/reference/mongo/setup.xml @@ -1,5 +1,5 @@ - + &reftitle.setup; @@ -9,7 +9,7 @@ Requires PHP 5.0 and up. - You can download Mongo from &url.mongo;. + You can download MongoDB from &url.mongodb;. diff --git a/reference/mongo/versions.xml b/reference/mongo/versions.xml index ec1cb9f6e7..bebcc0390b 100644 --- a/reference/mongo/versions.xml +++ b/reference/mongo/versions.xml @@ -1,5 +1,5 @@ - + @@ -29,8 +29,21 @@ + + + + + + + + + + + + +