From 8f1beeca1167fcf13cdae37d523cef0ccd12d7e6 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Thu, 28 Jan 2010 17:35:41 +0000 Subject: [PATCH] got rid of intro git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@294158 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/book.xml | 11 ---------- reference/mongo/mongodb/authenticate.xml | 22 ++++++++++++++++++++ reference/mongo/mongodb/command.xml | 21 +++++++++++++++++++ reference/mongo/mongodb/createcollection.xml | 14 +++++++++++++ reference/mongo/mongodb/createdbref.xml | 12 ++++++++--- reference/mongo/queries.xml | 2 +- 6 files changed, 67 insertions(+), 15 deletions(-) diff --git a/reference/mongo/book.xml b/reference/mongo/book.xml index 798062883d..b3da9abc6d 100644 --- a/reference/mongo/book.xml +++ b/reference/mongo/book.xml @@ -5,17 +5,6 @@ Mongo Mongo - - &reftitle.intro; - - MongoDB is a high-performance, open source, schema-free document database - designed for creating scalable websites. This is the PHP driver for MongoDB. - To use the PHP driver, you must first download the database server from - &url.mongodb;. - - - - &reference.mongo.manual; diff --git a/reference/mongo/mongodb/authenticate.xml b/reference/mongo/mongodb/authenticate.xml index cb1a2a4c76..1235ecf59f 100644 --- a/reference/mongo/mongodb/authenticate.xml +++ b/reference/mongo/mongodb/authenticate.xml @@ -18,6 +18,28 @@ enabled for the database server (it's not, by default), you need to log in before the database will allow you to do anything. + + This method is identical to running: + +command(array("getnonce" => 1)); + +$saltedHash = md5($nonce["nonce"]."${username}${hash}"); + +$result = $db->command(array("authenticate" => 1, + "user" => $username, + "nonce" => $nonce["nonce"], + "key" => $saltedHash); + +?> +]]> + + &reftitle.parameters; diff --git a/reference/mongo/mongodb/command.xml b/reference/mongo/mongodb/command.xml index 8e6582ed65..edbe27330b 100644 --- a/reference/mongo/mongodb/command.xml +++ b/reference/mongo/mongodb/command.xml @@ -17,6 +17,18 @@ Need to know the database version? There's a command for that. Need to do aggregation? There's a command for that. Need to turn up logging? You get the idea. + + This method is identical to running: + +selectCollection('$cmd')->findOne($data); + +?> +]]> + + &reftitle.parameters; @@ -119,6 +131,15 @@ User 47cc67093475061e3d9536d2 had 3 sale(s). User 49902cde5162504500b45c2c had 14 sale(s). User 4af467e4fd543cce7b0ea8e2 had 1 sale(s). + + If you are going to be using MapReduce, Prajwal Tuladhar created an API for + Mongo PHP users which provides a nicer interface than the bare command. You + can download it from + Github + and there is a + blog post + on how to use it. + diff --git a/reference/mongo/mongodb/createcollection.xml b/reference/mongo/mongodb/createcollection.xml index e2ed4addbe..e3bfbafe1f 100644 --- a/reference/mongo/mongodb/createcollection.xml +++ b/reference/mongo/mongodb/createcollection.xml @@ -15,6 +15,20 @@ intsize0 intmax0 + + This method is used to create capped collections and other collections + requiring special options. It is identical to running: + +command(array("create" => $name, "size" => $size, "capped" => $capped, "max" => $max)); + +?> +]]> + + See MongoDB::command for more information about database commands. + &reftitle.parameters; diff --git a/reference/mongo/mongodb/createdbref.xml b/reference/mongo/mongodb/createdbref.xml index 72264acf6c..88eff8163b 100644 --- a/reference/mongo/mongodb/createdbref.xml +++ b/reference/mongo/mongodb/createdbref.xml @@ -11,9 +11,13 @@ &reftitle.description; public arrayMongoDB::createDBRef - mixedns + stringcollection mixeda + + This method is a flexible interface for creating database refrences (see + MongoDBRef). + @@ -22,7 +26,7 @@ - ns + collection @@ -36,7 +40,9 @@ - Object or _id to which to create a reference. + Object or _id to which to create a reference. If an an object or + associative array is given, this will create a refernce using the _id + field. diff --git a/reference/mongo/queries.xml b/reference/mongo/queries.xml index 97de08db69..74014286a1 100644 --- a/reference/mongo/queries.xml +++ b/reference/mongo/queries.xml @@ -1,7 +1,7 @@
- Querying MongoDB + Querying
Querying by _id