svn: /phpdoc/en/trunk/reference/mongo/ book.xml mongodb/authenticate.xml mongodb/command.xml mongodb/createcollection.xml mongodb/createdbref.xml
queries.xml

From: Date: Thu, 28 Jan 2010 17:35:41 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongo/ book.xml mongodb/authenticate.xml mongodb/command.xml mongodb/createcollection.xml mongodb/createdbref.xml
queries.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5946@lists.php.net to get a copy of this message
kristina Thu, 28 Jan 2010 17:35:41 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=294158 Log: got rid of intro Changed paths: U phpdoc/en/trunk/reference/mongo/book.xml U phpdoc/en/trunk/reference/mongo/mongodb/authenticate.xml U phpdoc/en/trunk/reference/mongo/mongodb/command.xml U phpdoc/en/trunk/reference/mongo/mongodb/createcollection.xml U phpdoc/en/trunk/reference/mongo/mongodb/createdbref.xml U phpdoc/en/trunk/reference/mongo/queries.xml Modified: phpdoc/en/trunk/reference/mongo/book.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/book.xml 2010-01-28 17:31:13 UTC (rev 294157) +++ phpdoc/en/trunk/reference/mongo/book.xml 2010-01-28 17:35:41 UTC (rev 294158) @@ -5,17 +5,6 @@ <title>Mongo</title> <titleabbrev>Mongo</titleabbrev> - <preface xml:id="intro.mongo"> - &reftitle.intro; - <para> - 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;. - </para> - - </preface> - &reference.mongo.manual; <part> Modified: phpdoc/en/trunk/reference/mongo/mongodb/authenticate.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongodb/authenticate.xml 2010-01-28 17:31:13 UTC (rev 294157) +++ phpdoc/en/trunk/reference/mongo/mongodb/authenticate.xml 2010-01-28 17:35:41 UTC (rev 294158) @@ -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. </para> + <para> + This method is identical to running: + <programlisting role="php"> +<![CDATA[ +<?php + +$salted = "${username}:mongo:${password}"; +$hash = md5($salted); + +$nonce = $db->command(array("getnonce" => 1)); + +$saltedHash = md5($nonce["nonce"]."${username}${hash}"); + +$result = $db->command(array("authenticate" => 1, + "user" => $username, + "nonce" => $nonce["nonce"], + "key" => $saltedHash); + +?> +]]> + </programlisting> + </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; Modified: phpdoc/en/trunk/reference/mongo/mongodb/command.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongodb/command.xml 2010-01-28 17:31:13 UTC (rev 294157) +++ phpdoc/en/trunk/reference/mongo/mongodb/command.xml 2010-01-28 17:35:41 UTC (rev 294158) @@ -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. </para> + <para> + This method is identical to running: + <programlisting role="php"> +<![CDATA[ +<?php + +$db->selectCollection('$cmd')->findOne($data); + +?> +]]> + </programlisting> + </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; @@ -119,6 +131,15 @@ User 49902cde5162504500b45c2c had 14 sale(s). User 4af467e4fd543cce7b0ea8e2 had 1 sale(s). </screen> + <para> + 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 + <link xlink:href="http://github.com/infynyxx/MongoDB-MapReduce-PHP">Github</link> + and there is a + <link xlink:href="http://prajwal-tuladhar.net.np/2009/11/15/496/mapreduce-api-for-mongodb/">blog post</link> + on how to use it. + </para> </example> </refsect1> </refentry> Modified: phpdoc/en/trunk/reference/mongo/mongodb/createcollection.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongodb/createcollection.xml 2010-01-28 17:31:13 UTC (rev 294157) +++ phpdoc/en/trunk/reference/mongo/mongodb/createcollection.xml 2010-01-28 17:35:41 UTC (rev 294158) @@ -15,6 +15,20 @@ <methodparam choice="opt"><type>int</type><parameter>size</parameter><initializer>0</initializer></methodparam> <methodparam choice="opt"><type>int</type><parameter>max</parameter><initializer>0</initializer></methodparam> </methodsynopsis> + <para> + This method is used to create capped collections and other collections + requiring special options. It is identical to running: + <programlisting role="php"> +<![CDATA[ +<?php + +$collection = $db->command(array("create" => $name, "size" => $size, "capped" => $capped, "max" => $max)); + +?> +]]> + </programlisting> + See <function>MongoDB::command</function> for more information about database commands. + </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; Modified: phpdoc/en/trunk/reference/mongo/mongodb/createdbref.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongodb/createdbref.xml 2010-01-28 17:31:13 UTC (rev 294157) +++ phpdoc/en/trunk/reference/mongo/mongodb/createdbref.xml 2010-01-28 17:35:41 UTC (rev 294158) @@ -11,9 +11,13 @@ &reftitle.description; <methodsynopsis> <modifier>public</modifier> <type>array</type><methodname>MongoDB::createDBRef</methodname> - <methodparam><type>mixed</type><parameter>ns</parameter></methodparam> + <methodparam><type>string</type><parameter>collection</parameter></methodparam> <methodparam><type>mixed</type><parameter>a</parameter></methodparam> </methodsynopsis> + <para> + This method is a flexible interface for creating database refrences (see + <classname>MongoDBRef</classname>). + </para> </refsect1> <refsect1 role="parameters"> @@ -22,7 +26,7 @@ <variablelist> <varlistentry> <term> - <parameter>ns</parameter> + <parameter>collection</parameter> </term> <listitem> <para> @@ -36,7 +40,9 @@ </term> <listitem> <para> - 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. </para> </listitem> </varlistentry> Modified: phpdoc/en/trunk/reference/mongo/queries.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/queries.xml 2010-01-28 17:31:13 UTC (rev 294157) +++ phpdoc/en/trunk/reference/mongo/queries.xml 2010-01-28 17:35:41 UTC (rev 294158) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> <section xml:id="mongo.queries" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>Querying MongoDB</title> + <title>Querying</title> <section> <title>Querying by _id</title>

« previous php.doc.cvs (#5946) next »