diff --git a/reference/mongo/mongobindata.xml b/reference/mongo/mongobindata.xml
index c5c683938e..fb636e310c 100644
--- a/reference/mongo/mongobindata.xml
+++ b/reference/mongo/mongobindata.xml
@@ -24,7 +24,8 @@
For example, to embed an image in a document, one could write:
-
+
+
save($profile);
?>
]]>
-
+
+
This class contains a type field, which currently gives
no additional functionality in the driver or the database. There are five
diff --git a/reference/mongo/mongoclient.xml b/reference/mongo/mongoclient.xml
index 27e22a0356..1c724f3e14 100644
--- a/reference/mongo/mongoclient.xml
+++ b/reference/mongo/mongoclient.xml
@@ -15,7 +15,9 @@
This class is used to create and manage connections. A typical use is:
-
+
+ MongoClient basic usage
+
foo; // get the database named "foo"
?>
]]>
-
+
+
See MongoClient::__construct and the section on
@@ -125,6 +128,7 @@ $db = $m->foo; // get the database named "foo"
&Methods;
+
@@ -132,7 +136,7 @@ $db = $m->foo; // get the database named "foo"
-
+
&reftitle.constants;
MongoClient Constants
@@ -218,7 +222,7 @@ $db = $m->foo; // get the database named "foo"
-
+ Fields
@@ -245,11 +249,14 @@ $db = $m->foo; // get the database named "foo"
-
+
&reftitle.seealso;
-
- MongoDB core docs on connecting.
-
+
+
+
+
+ MongoDB core docs on connecting
+
diff --git a/reference/mongo/mongoclient/construct.xml b/reference/mongo/mongoclient/construct.xml
index 5e75ce4d83..f9aab62297 100644
--- a/reference/mongo/mongoclient/construct.xml
+++ b/reference/mongo/mongoclient/construct.xml
@@ -9,11 +9,11 @@
&reftitle.description;
-
+ publicMongoClient::__constructstringserver"mongodb://localhost:27017"arrayoptionsarray("connect" => &true;)
-
+
If no parameters are passed, this connects to "localhost:27017" (or whatever
was specified in php.ini for
diff --git a/reference/mongo/mongoconnectionexception.xml b/reference/mongo/mongoconnectionexception.xml
index 9342feb2bd..53a5131114 100644
--- a/reference/mongo/mongoconnectionexception.xml
+++ b/reference/mongo/mongoconnectionexception.xml
@@ -124,6 +124,9 @@ $ /usr/sbin/setsebool -P httpd_can_network_connect 1
+
+ MongoConnectionException
+ extendsMongoException
diff --git a/reference/mongo/mongocursor.xml b/reference/mongo/mongocursor.xml
index fe79592df2..88eee56979 100644
--- a/reference/mongo/mongocursor.xml
+++ b/reference/mongo/mongocursor.xml
@@ -14,7 +14,9 @@
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:
-
+
+ MongoCursor basic usage
+
]]>
-
+
+
You don't generally create cursors using the
@@ -39,7 +42,9 @@ var_dump(iterator_to_array($cursor));
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:
-
+
+ Iterating over MongoCursor
+
]]>
-
+
+
This will go through each document in the collection, loading and garbage
collecting documents as needed.
@@ -80,7 +86,9 @@ foreach ($cursor as $doc) {
by the database and cannot be modified anymore.
-
+
+ Adding options to MongoCursor
+
getNext());
$cursor->skip(4);
?>
]]>
-
+
+
diff --git a/reference/mongo/mongocursorexception.xml b/reference/mongo/mongocursorexception.xml
index 78daf6c767..0b0362e726 100644
--- a/reference/mongo/mongocursorexception.xml
+++ b/reference/mongo/mongocursorexception.xml
@@ -392,6 +392,9 @@ catch (MongoCursorException $e) {
+
+ MongoCursorException
+ extendsMongoException
diff --git a/reference/mongo/mongocursortimeoutexception.xml b/reference/mongo/mongocursortimeoutexception.xml
index 2158fd318f..0bd2ff42ef 100644
--- a/reference/mongo/mongocursortimeoutexception.xml
+++ b/reference/mongo/mongocursortimeoutexception.xml
@@ -32,6 +32,9 @@
+
+ MongoCursorTimeoutException
+ extendsMongoCursorException
diff --git a/reference/mongo/mongodate.xml b/reference/mongo/mongodate.xml
index 8c20b7e1f0..988da1ba2b 100644
--- a/reference/mongo/mongodate.xml
+++ b/reference/mongo/mongodate.xml
@@ -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:
-
+
+ Storing dates with MongoDate
+
find(array("ts" => array('$gt' => $start, '$lte' => $end)));
?>
]]>
-
+
+
MongoDB stores dates as milliseconds past the epoch. This means that dates
do not contain timezone information. Timezones must be
diff --git a/reference/mongo/mongodb.xml b/reference/mongo/mongodb.xml
index dd4fb53113..832ec44005 100644
--- a/reference/mongo/mongodb.xml
+++ b/reference/mongo/mongodb.xml
@@ -14,7 +14,9 @@
Instances of this class are used to interact with a database. To get a
database:
-
+
+ Selecting a database
+
selectDB("example");
?>
]]>
-
+
+
Database names can use almost any character in the ASCII range. However,
they cannot contain " ", "." or be the empty string.
The name "system" is also reserved.
diff --git a/reference/mongo/mongodbref.xml b/reference/mongo/mongodbref.xml
index fc79df9d8e..828dab9d14 100644
--- a/reference/mongo/mongodbref.xml
+++ b/reference/mongo/mongodbref.xml
@@ -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:
-
+
+ Linking documents
+
insert($me);
?>
]]>
-
+
+
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 MongoDBRefs to keep track of what "like" went
with what collection:
+
+ Creating MongoDBRef links
insert(array("name" => "Fred", "likes" => array($trainRef, $soccerRef))
?>
]]>
-
+
+
Database references can be thought of as hyperlinks: they give the unique
diff --git a/reference/mongo/mongoexception.xml b/reference/mongo/mongoexception.xml
index de112ff698..1ae1c1920c 100644
--- a/reference/mongo/mongoexception.xml
+++ b/reference/mongo/mongoexception.xml
@@ -227,6 +227,9 @@
+
+ MongoException
+ extendsException
diff --git a/reference/mongo/mongogridfsexception.xml b/reference/mongo/mongogridfsexception.xml
index e48fe50686..3c89412335 100644
--- a/reference/mongo/mongogridfsexception.xml
+++ b/reference/mongo/mongogridfsexception.xml
@@ -27,6 +27,9 @@
+
+ MongoGridFSException
+ extendsMongoException