added exceptions, empty obj

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@283677 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kristina Chodorow 2009-07-07 21:34:30 +00:00
parent ea6162a941
commit 87e0b8ea27
9 changed files with 379 additions and 5 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<book xml:id="book.mongo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Mongo</title>
@ -36,6 +36,7 @@
&reference.mongo.mongodb;
&reference.mongo.mongocollection;
&reference.mongo.mongocursor;
&reference.mongo.mongoemptyobj;
&reference.mongo.mongogridfs;
&reference.mongo.mongogridfsfile;
&reference.mongo.mongogridfscursor;
@ -47,6 +48,11 @@
&reference.mongo.mongobindata;
&reference.mongo.mongodbref;
&reference.mongo.mongoexception;
&reference.mongo.mongocursorexception;
&reference.mongo.mongoconnectionexception;
&reference.mongo.mongogridfsexception;
</book>
<!-- Keep this comment at the end of the file

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<section xml:id="mongo.configuration" xmlns="http://docbook.org/ns/docbook">
&reftitle.runtime;
&extension.runtime;
@ -146,6 +146,8 @@
<listitem>
<para>
The number of bytes-per-chunk. Used in divvying up GridFS files.
This number must be at least 100 less than 4 megabytes (max:
4194204) and it is recommended that it be less than that.
</para>
</listitem>
</varlistentry>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry xml:id="mongocollection.findone" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoCollection::findOne</refname>
@ -12,6 +12,7 @@
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>MongoCollection::findOne</methodname>
<methodparam choice="opt"><type>array</type><parameter>query</parameter><initializer>array()</initializer></methodparam>
<methodparam choice="opt"><type>array</type><parameter>fields</parameter><initializer>array()</initializer></methodparam>
</methodsynopsis>
</refsect1>
@ -29,6 +30,16 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<parameter>fields</parameter>
</term>
<listitem>
<para>
Fields of the results to return.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry xml:id="mongocollection.insert" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoCollection::insert</refname>
@ -36,7 +36,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns if the array was inserted.
Returns if the array was not empty (an empty array will not be inserted).
</para>
</refsect1>
</refentry>

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<phpdoc:classref xml:id="class.mongoconnectionexception" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The MongoConnectionException class</title>
<titleabbrev>MongoConnectionException</titleabbrev>
<partintro>
<!-- {{{ Mongoconnectionexception intro -->
<section xml:id="mongoconnectionexception.intro">
&reftitle.intro;
<para>
Thrown when the driver fails to connect to the database.
</para>
</section>
<!-- }}} -->
<section xml:id="mongoconnectionexception.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>MongoConnectionException</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<modifier>extends</modifier>
<classname>MongoException</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
</classsynopsis>
<!-- }}} -->
</section>
</partintro>
</phpdoc:classref>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<phpdoc:classref xml:id="class.mongocursorexception" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The MongoCursorException class</title>
<titleabbrev>MongoCursorException</titleabbrev>
<partintro>
<!-- {{{ MongoCursorException intro -->
<section xml:id="mongocursorexception.intro">
&reftitle.intro;
<para>
Thrown by accessing a cursor incorrectly.
</para>
</section>
<!-- }}} -->
<section xml:id="mongocursorexception.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>MongoCursorException</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<modifier>extends</modifier>
<classname>MongoException</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
</classsynopsis>
<!-- }}} -->
</section>
</partintro>
</phpdoc:classref>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<phpdoc:classref xml:id="class.mongoemptyobj" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The MongoEmptyObj class</title>
<titleabbrev>MongoEmptyObj</titleabbrev>
<partintro>
<!-- {{{ MongoEmptyObj intro -->
<section xml:id="mongoemptyobj.intro">
&reftitle.intro;
<para>
This class is used to insert an empty object into the database.
</para>
<para>
Inserting an empty array will create an array-type document, which can
be used for (among other things) $push updates:
</para>
<programlisting role="php">
<![CDATA[
<?php
$collection->insert(array('x' => array()));
?>
]]>
</programlisting>
<para>The shell shows that an empty array is saved as an array:</para>
<programlisting role="javascript">
<![CDATA[
> db.collection.findOne()
{ 'x' : [] }
]]>
</programlisting>
<para>
Inserting a MongoEmptyObj will create an object-type document:
</para>
<programlisting role="php">
<![CDATA[
<?php
$collection->insert(array('x' => new MongoEmptyObj()));
?>
]]>
</programlisting>
<para>The shell shows that a MongoEmptyObj is saved as an object:</para>
<programlisting role="javascript">
<![CDATA[
> db.collection.findOne()
{ 'x' : {} }
]]>
</programlisting>
</section>
<!-- }}} -->
<section xml:id="mongoemptyobj.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>MongoEmptyObj</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>MongoEmptyObj</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
</classsynopsis>
<!-- }}} -->
</section>
</partintro>
</phpdoc:classref>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<phpdoc:classref xml:id="class.mongoexception" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The MongoException class</title>
<titleabbrev>MongoException</titleabbrev>
<partintro>
<!-- {{{ MongoException intro -->
<section xml:id="mongoexception.intro">
&reftitle.intro;
<para>
Default Mongo exception.
</para>
</section>
<!-- }}} -->
<section xml:id="mongoexception.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>MongoException</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<modifier>extends</modifier>
<classname>Exception</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
</classsynopsis>
<!-- }}} -->
</section>
</partintro>
</phpdoc:classref>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<phpdoc:classref xml:id="class.mongogridfsexception" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The MongoGridFSException class</title>
<titleabbrev>MongoGridFSException</titleabbrev>
<partintro>
<!-- {{{ Mongogridfsexception intro -->
<section xml:id="mongogridfsexception.intro">
&reftitle.intro;
<para>
Thrown when there are errors reading or writing files
to or from the database.
</para>
</section>
<!-- }}} -->
<section xml:id="mongogridfsexception.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>MongoGridFSException</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<modifier>extends</modifier>
<classname>MongoException</classname>
</ooclass>
</classsynopsisinfo>
<!-- }}} -->
</classsynopsis>
<!-- }}} -->
</section>
</partintro>
</phpdoc:classref>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->