Various markup fixes

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328555 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2012-11-29 05:37:54 +00:00
parent 82a3f40a46
commit fb8f8617ef
12 changed files with 70 additions and 25 deletions

View file

@ -24,7 +24,8 @@
<para>
For example, to embed an image in a document, one could write:
</para>
<programlisting role="php">
<example xml:id="mongobindata.intro-example">
<programlisting role="php">
<![CDATA[
<?php
@ -36,7 +37,8 @@ $users->save($profile);
?>
]]>
</programlisting>
</programlisting>
</example>
<para>
This class contains a <varname>type</varname> field, which currently gives
no additional functionality in the driver or the database. There are five

View file

@ -15,7 +15,9 @@
</para>
<para>
This class is used to create and manage connections. A typical use is:
<programlisting role="php">
<example xml:id="mongoclient.intro-example">
<title><classname>MongoClient</classname> basic usage</title>
<programlisting role="php">
<![CDATA[
<?php
@ -24,7 +26,8 @@ $db = $m->foo; // get the database named "foo"
?>
]]>
</programlisting>
</programlisting>
</example>
</para>
<para>
See <function>MongoClient::__construct</function> and the section on
@ -125,6 +128,7 @@ $db = $m->foo; // get the database named "foo"
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongoclient')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongoclient')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
</classsynopsis>
<!-- }}} -->
@ -132,7 +136,7 @@ $db = $m->foo; // get the database named "foo"
</section>
<!-- Mongo constants -->
<section>
<section xml:id="mongoclient.constants">
&reftitle.constants;
<section xml:id="mongoclient.constants.types">
<title>MongoClient Constants</title>
@ -218,7 +222,7 @@ $db = $m->foo; // get the database named "foo"
</section>
</section>
<section>
<section xml:id="mongoclient.fields">
<title>Fields</title>
<variablelist>
<varlistentry xml:id="mongoclient.props.connected">
@ -245,11 +249,14 @@ $db = $m->foo; // get the database named "foo"
</variablelist>
</section>
<section>
<section role="seealso" xml:id="mongoclient.seealso">
&reftitle.seealso;
<para>
MongoDB core docs on <link xlink:href="&url.mongodb.dochub.connections;">connecting</link>.
</para>
<simplelist>
<member><xref linkend="mongo.readpreferences" /></member>
<member><xref linkend="mongo.writeconcerns" /></member>
<member><xref linkend="mongo.connecting" /></member>
<member>MongoDB core docs on <link xlink:href="&url.mongodb.dochub.connections;">connecting</link></member>
</simplelist>
</section>
<!-- }}} -->

View file

@ -9,11 +9,11 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<constructorsynopsis>
<modifier>public</modifier> <methodname>MongoClient::__construct</methodname>
<methodparam choice="opt"><type>string</type><parameter>server</parameter><initializer>"mongodb://localhost:27017"</initializer></methodparam>
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>array("connect" => &true;)</initializer></methodparam>
</methodsynopsis>
</constructorsynopsis>
<para>
If no parameters are passed, this connects to "localhost:27017" (or whatever
was specified in php.ini for

View file

@ -124,6 +124,9 @@ $ /usr/sbin/setsebool -P httpd_can_network_connect 1
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>MongoConnectionException</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>MongoException</classname>

View file

@ -14,7 +14,9 @@
<para>
A cursor is used to iterate through the results of a database query. For
example, to query the database and see all results, you could do:
<programlisting role="php">
<example xml:id="mongocursor.intro-example">
<title><classname>MongoCursor</classname> basic usage</title>
<programlisting role="php">
<![CDATA[
<?php
@ -23,7 +25,8 @@ var_dump(iterator_to_array($cursor));
?>
]]>
</programlisting>
</programlisting>
</example>
</para>
<para>
You don't generally create cursors using the
@ -39,7 +42,9 @@ var_dump(iterator_to_array($cursor));
<para>
If we have a large result set, we can iterate through it, loading a few
megabytes of results into memory at a time. For example, we could do:
<programlisting role="php">
<example>
<title>Iterating over <classname>MongoCursor</classname></title>
<programlisting role="php">
<![CDATA[
<?php
@ -51,7 +56,8 @@ foreach ($cursor as $doc) {
?>
]]>
</programlisting>
</programlisting>
</example>
This will go through each document in the collection, loading and garbage
collecting documents as needed.
</para>
@ -80,7 +86,9 @@ foreach ($cursor as $doc) {
by the database and cannot be modified anymore.
</para>
<para>
<programlisting role="php">
<example xml:id="mongocursor.stages.adding-options">
<title>Adding options to <classname>MongoCursor</classname></title>
<programlisting role="php">
<![CDATA[
<?php
@ -96,7 +104,8 @@ var_dump($cursor->getNext());
$cursor->skip(4);
?>
]]>
</programlisting>
</programlisting>
</example>
</para>
</section>
<!-- }}} -->

View file

@ -392,6 +392,9 @@ catch (MongoCursorException $e) {
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>MongoCursorException</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>MongoException</classname>

View file

@ -32,6 +32,9 @@
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>MongoCursorTimeoutException</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>MongoCursorException</classname>

View file

@ -15,7 +15,9 @@
Represent date objects for the database. This class should be used to save
dates to the database and to query for dates. For example:
</para>
<programlisting role="php">
<example>
<title>Storing dates with <classname>MongoDate</classname></title>
<programlisting role="php">
<![CDATA[
<?php
@ -30,7 +32,8 @@ $collection->find(array("ts" => array('$gt' => $start, '$lte' => $end)));
?>
]]>
</programlisting>
</programlisting>
</example>
<para>
MongoDB stores dates as milliseconds past the epoch. This means that dates
<emphasis>do not</emphasis> contain timezone information. Timezones must be

View file

@ -14,7 +14,9 @@
<para>
Instances of this class are used to interact with a database. To get a
database:
<programlisting role="php">
<example>
<title>Selecting a database</title>
<programlisting role="php">
<![CDATA[
<?php
@ -23,7 +25,8 @@ $db = $m->selectDB("example");
?>
]]>
</programlisting>
</programlisting>
</example>
Database names can use almost any character in the ASCII range. However,
they cannot contain &quot; &quot;, &quot;.&quot; or be the empty string.
The name "system" is also reserved.

View file

@ -21,7 +21,9 @@
document. For example, if we had a "people" collection and an "addresses"
collection, we might want to create a link between each person document and
an address document:
<programlisting role="php">
<example>
<title>Linking documents</title>
<programlisting role="php">
<![CDATA[
<?php
@ -43,7 +45,8 @@ $people->insert($me);
?>
]]>
</programlisting>
</programlisting>
</example>
</para>
<para>
Then, later on, we can find the person's address by querying the "addresses"
@ -61,6 +64,8 @@ $people->insert($me);
multiple collections, such as "hobbies", "sports", "books", etc., we could
use <classname>MongoDBRef</classname>s to keep track of what "like" went
with what collection:
<example>
<title>Creating MongoDBRef links</title>
<programlisting role="php">
<![CDATA[
<?php
@ -78,7 +83,8 @@ $people->insert(array("name" => "Fred", "likes" => array($trainRef, $soccerRef))
?>
]]>
</programlisting>
</programlisting>
</example>
</para>
<para>
Database references can be thought of as hyperlinks: they give the unique

View file

@ -227,6 +227,9 @@
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>MongoException</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>Exception</classname>

View file

@ -27,6 +27,9 @@
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>MongoGridFSException</classname>
</ooclass>
<ooclass>
<modifier>extends</modifier>
<classname>MongoException</classname>