Commit faafeece authored by Jeremy Mikola's avatar Jeremy Mikola

Revise class documentation and fix references

parent 241707f9
......@@ -15,12 +15,12 @@ Definition
.. phpclass:: MongoDB\\Client
Serves as an entry point for the |php-library|. ``MongoDB\Client``
is the preferred class for connecting to a MongoDB server or cluster
of servers and serves as a gateway for accessing individual
databases and collections. ``MongoDB\Client`` is analogous to the
driver's :php:`MongoDB\\Driver\\Manager <mongodb-driver-manager>`
class, which it composes.
This class serves as an entry point for the |php-library|. It is the
preferred class for connecting to a MongoDB server or cluster of servers and
acts as a gateway for accessing individual databases and collections.
:phpclass:`MongoDB\\Client` is analogous to the driver's
:php:`MongoDB\\Driver\\Manager <mongodb-driver-manager>` class, which it
`composes <https://en.wikipedia.org/wiki/Object_composition>`_.
Methods
-------
......
......@@ -18,24 +18,28 @@ Definition
Provides methods for common operations on collections and documents,
including CRUD operations and index management.
You can construct collections directly using the PHP extension's
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class, select
a collection from the |php-library|'s :phpclass:`MongoDB\\Client` or
:phpclass:`MongoDB\\Database` classes, or create a collection from an
existing collection using the
:phpmethod:`withOptions() <MongoDB\\Collection::withOptions>` clone method.
You can construct collections directly using the driver's
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class or
select a collection from the library's :phpclass:`MongoDB\\Client` or
:phpclass:`MongoDB\\Database` classes. A collection may also be cloned from
an existing :phpclass:`MongoDB\\Collection` object via the
:phpmethod:`withOptions() <MongoDB\\Collection::withOptions>` method.
:phpclass:`MongoDB\\Collection` supports the :php:`readConcern
<mongodb-driver-readconcern>`, :php:`readPreference
<mongodb-driver-readpreference>`, :php:`typeMap
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`,
and :php:`writeConcern <mongodb-driver-writeconcern>` options.
If you omit an option, the collection inherits the value from the
Manager constructor argument or the Database object used to select
the collection.
and :php:`writeConcern <mongodb-driver-writeconcern>` options. If you omit an
option, the collection inherits the value from the :php:`Manager
<mongodb-driver-manager>` constructor argument or the :phpclass:`Client
<MongoDB\\Client>` or :phpclass:`Database <MongoDB\\Database>` object used to
select the collection.
Operations within the :phpclass:`MongoDB\\Collection` class inherit the
Collection's options.
collection's options.
Type Map Limitations
--------------------
The :manual:`aggregate </reference/command/aggregate>` (when not using a
cursor), :manual:`distinct </reference/command/distinct>`, and
......@@ -49,7 +53,6 @@ Definition
methods return BSON documents as `stdClass` objects and BSON arrays as
arrays.
Methods
-------
......
......@@ -15,27 +15,28 @@ Definition
.. phpclass:: MongoDB\\Database
Provides methods for common operations on a database,
such as executing database commands and managing collections.
Provides methods for common operations on a database, such as executing
database commands and managing collections.
You can construct a database directly using the PHP extension's
You can construct a database directly using the driver's
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class or
select a database from the |php-library|'s :phpclass:`MongoDB\\Client` class.
select a database from the library's :phpclass:`MongoDB\\Client` class. A
database may also be cloned from an existing :phpclass:`MongoDB\\Database`
object via the :phpmethod:`withOptions() <MongoDB\\Database::withOptions>`
method.
:phpclass:`MongoDB\\Database` supports the :php:`readConcern
<mongodb-driver-readconcern>`, :php:`readPreference
<mongodb-driver-readpreference>`, :php:`typeMap
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`,
and :php:`writeConcern <mongodb-driver-writeconcern>` options.
If you omit an option, the database inherits the value from the
Manager constructor argument or the Client object used to select
the database.
and :php:`writeConcern <mongodb-driver-writeconcern>` options. If you omit an
option, the database inherits the value from the :php:`Manager
<mongodb-driver-manager>` constructor argument or the :phpclass:`Client
<MongoDB\\Client>` object used to select the database.
Operations within the :phpclass:`MongoDB\\Database` class inherit the
Database's options.
.. _database-methods:
Methods
-------
......
......@@ -22,11 +22,11 @@ Definition
class provides an interface around these collections for working with the
files as PHP :php:`Streams <stream>`.
You can construct a GridFS bucket using the PHP extension's
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class, or
select a bucket from the |php-library|'s :phpclass:`MongoDB\\Database` class
via the :phpmethod:`selectGridFSBucket()
<MongoDB\\Database::selectGridFSBucket>` method.
You can construct a GridFS bucket using the driver's
:php:`Manager <class.mongodb-driver-manager>` class, or select a bucket from
the library's :phpclass:`MongoDB\\Database` class via the
:phpmethod:`selectGridFSBucket() <MongoDB\\Database::selectGridFSBucket>`
method.
Methods
-------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment