Skip to content

Commit 60f7ea6

Browse files
committed
Revise class documentation and fix references
1 parent eda7d51 commit 60f7ea6

File tree

4 files changed

+37
-33
lines changed

4 files changed

+37
-33
lines changed

docs/reference/class/MongoDBClient.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Definition
1515

1616
.. phpclass:: MongoDB\\Client
1717

18-
Serves as an entry point for the |php-library|. ``MongoDB\Client``
19-
is the preferred class for connecting to a MongoDB server or cluster
20-
of servers and serves as a gateway for accessing individual
21-
databases and collections. ``MongoDB\Client`` is analogous to the
22-
driver's :php:`MongoDB\\Driver\\Manager <mongodb-driver-manager>`
23-
class, which it composes.
18+
This class serves as an entry point for the |php-library|. It is the
19+
preferred class for connecting to a MongoDB server or cluster of servers and
20+
acts as a gateway for accessing individual databases and collections.
21+
:phpclass:`MongoDB\\Client` is analogous to the driver's
22+
:php:`MongoDB\\Driver\\Manager <mongodb-driver-manager>` class, which it
23+
`composes <https://en.wikipedia.org/wiki/Object_composition>`_.
2424

2525
Methods
2626
-------

docs/reference/class/MongoDBCollection.txt

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,28 @@ Definition
1818
Provides methods for common operations on collections and documents,
1919
including CRUD operations and index management.
2020

21-
You can construct collections directly using the PHP extension's
22-
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class, select
23-
a collection from the |php-library|'s :phpclass:`MongoDB\\Client` or
24-
:phpclass:`MongoDB\\Database` classes, or create a collection from an
25-
existing collection using the
26-
:phpmethod:`withOptions() <MongoDB\\Collection::withOptions>` clone method.
21+
You can construct collections directly using the driver's
22+
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class or
23+
select a collection from the library's :phpclass:`MongoDB\\Client` or
24+
:phpclass:`MongoDB\\Database` classes. A collection may also be cloned from
25+
an existing :phpclass:`MongoDB\\Collection` object via the
26+
:phpmethod:`withOptions() <MongoDB\\Collection::withOptions>` method.
2727

2828
:phpclass:`MongoDB\\Collection` supports the :php:`readConcern
2929
<mongodb-driver-readconcern>`, :php:`readPreference
3030
<mongodb-driver-readpreference>`, :php:`typeMap
3131
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`,
32-
and :php:`writeConcern <mongodb-driver-writeconcern>` options.
33-
If you omit an option, the collection inherits the value from the
34-
Manager constructor argument or the Database object used to select
35-
the collection.
32+
and :php:`writeConcern <mongodb-driver-writeconcern>` options. If you omit an
33+
option, the collection inherits the value from the :php:`Manager
34+
<mongodb-driver-manager>` constructor argument or the :phpclass:`Client
35+
<MongoDB\\Client>` or :phpclass:`Database <MongoDB\\Database>` object used to
36+
select the collection.
3637

3738
Operations within the :phpclass:`MongoDB\\Collection` class inherit the
38-
Collection's options.
39+
collection's options.
40+
41+
Type Map Limitations
42+
--------------------
3943

4044
The :manual:`aggregate </reference/command/aggregate>` (when not using a
4145
cursor), :manual:`distinct </reference/command/distinct>`, and
@@ -49,7 +53,6 @@ Definition
4953
methods return BSON documents as `stdClass` objects and BSON arrays as
5054
arrays.
5155

52-
5356
Methods
5457
-------
5558

docs/reference/class/MongoDBDatabase.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,28 @@ Definition
1515

1616
.. phpclass:: MongoDB\\Database
1717

18-
Provides methods for common operations on a database,
19-
such as executing database commands and managing collections.
18+
Provides methods for common operations on a database, such as executing
19+
database commands and managing collections.
2020

21-
You can construct a database directly using the PHP extension's
21+
You can construct a database directly using the driver's
2222
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class or
23-
select a database from the |php-library|'s :phpclass:`MongoDB\\Client` class.
23+
select a database from the library's :phpclass:`MongoDB\\Client` class. A
24+
database may also be cloned from an existing :phpclass:`MongoDB\\Database`
25+
object via the :phpmethod:`withOptions() <MongoDB\\Database::withOptions>`
26+
method.
2427

2528
:phpclass:`MongoDB\\Database` supports the :php:`readConcern
2629
<mongodb-driver-readconcern>`, :php:`readPreference
2730
<mongodb-driver-readpreference>`, :php:`typeMap
2831
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`,
29-
and :php:`writeConcern <mongodb-driver-writeconcern>` options.
30-
If you omit an option, the database inherits the value from the
31-
Manager constructor argument or the Client object used to select
32-
the database.
32+
and :php:`writeConcern <mongodb-driver-writeconcern>` options. If you omit an
33+
option, the database inherits the value from the :php:`Manager
34+
<mongodb-driver-manager>` constructor argument or the :phpclass:`Client
35+
<MongoDB\\Client>` object used to select the database.
3336

3437
Operations within the :phpclass:`MongoDB\\Database` class inherit the
3538
Database's options.
3639

37-
.. _database-methods:
38-
3940
Methods
4041
-------
4142

docs/reference/class/MongoDBGridFSBucket.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ Definition
2222
class provides an interface around these collections for working with the
2323
files as PHP :php:`Streams <stream>`.
2424

25-
You can construct a GridFS bucket using the PHP extension's
26-
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class, or
27-
select a bucket from the |php-library|'s :phpclass:`MongoDB\\Database` class
28-
via the :phpmethod:`selectGridFSBucket()
29-
<MongoDB\\Database::selectGridFSBucket>` method.
25+
You can construct a GridFS bucket using the driver's
26+
:php:`Manager <class.mongodb-driver-manager>` class, or select a bucket from
27+
the library's :phpclass:`MongoDB\\Database` class via the
28+
:phpmethod:`selectGridFSBucket() <MongoDB\\Database::selectGridFSBucket>`
29+
method.
3030

3131
Methods
3232
-------

0 commit comments

Comments
 (0)