got rid of intro

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@294158 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kristina Chodorow 2010-01-28 17:35:41 +00:00
parent 3b51539eee
commit 8f1beeca11
6 changed files with 67 additions and 15 deletions

View file

@ -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>

View file

@ -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;

View file

@ -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 47cc67093475061e3d9536d2 had 3 sale(s).
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>

View file

@ -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;

View file

@ -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>

View file

@ -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>