Skip to content

Commit ec1ae3a

Browse files
committed
Revise Collection and Database class intros
1 parent 6be5750 commit ec1ae3a

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

docs/reference/class/MongoDBCollection.txt

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,37 @@ Definition
1717

1818
Provides methods for common operations on collections and documents,
1919
including CRUD operations and index management.
20-
20+
2121
You can construct collections directly using the PHP extension's
22-
``Manager`` class, select a collection from the |php-library|'s
23-
:phpclass:`MongoDB\\Client` or :phpclass:`MongoDB\\Database`
24-
classes, or create a collection from an existing collection using the
25-
:phpmethod:`withOptions <MongoDB\\Collection::withOptions>` clone method.
26-
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.
27+
2728
:phpclass:`MongoDB\\Collection` supports the :php:`readConcern
2829
<mongodb-driver-readconcern>`, :php:`readPreference
2930
<mongodb-driver-readpreference>`, :php:`typeMap
30-
<mongodb.persistence.php#mongodb.persistence.typemaps>`, and
31-
:php:`writeConcern <mongodb-driver-writeconcern>` options.
31+
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`,
32+
and :php:`writeConcern <mongodb-driver-writeconcern>` options.
3233
If you omit an option, the collection inherits the value from the
3334
Manager constructor argument or the Database object used to select
3435
the collection.
3536

36-
Operations within the ``Collection`` class
37-
inherit the Collection's options.
38-
39-
The :phpmethod:`MongoDB\\Collection::aggregate` method (when not
40-
using a cursor), :phpmethod:`MongoDB\\Collection::distinct`, and
37+
Operations within the :phpclass:`MongoDB\\Collection` class inherit the
38+
Collection's options.
39+
40+
The :manual:`aggregate </reference/command/aggregate>` (when not using a
41+
cursor), :manual:`distinct </reference/command/distinct>`, and
4142
:manual:`findAndModify </reference/command/findAndModify>` helpers do not
42-
support a ``typeMap`` option due to a driver limitation.
43-
:phpmethod:`MongoDB\\Collection::aggregate`,
44-
:phpmethod:`MongoDB\\Collection::distinct`,
45-
:phpmethod:`MongoDB\\Collection::findOneAndReplace`,
46-
:phpmethod:`MongoDB\\Collection::findOneAndUpdate`, and
47-
:phpmethod:`MongoDB\\Collection::findOneAndDelete`
48-
return BSON documents as `stdClass` objects and arrays as arrays.
43+
support a ``typeMap`` option due to a driver limitation. The
44+
:phpmethod:`aggregate() <MongoDB\\Collection::aggregate>`,
45+
:phpmethod:`distinct() <MongoDB\\Collection::distinct>`,
46+
:phpmethod:`findOneAndReplace() <MongoDB\\Collection::findOneAndReplace>`,
47+
:phpmethod:`findOneAndUpdate() <MongoDB\\Collection::findOneAndUpdate>`, and
48+
:phpmethod:`findOneAndDelete() <MongoDB\\Collection::findOneAndDelete>`
49+
methods return BSON documents as `stdClass` objects and BSON arrays as
50+
arrays.
4951

5052

5153
Methods

docs/reference/class/MongoDBDatabase.txt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,22 @@ Definition
1919

2020
Provides methods for common operations on a database,
2121
such as executing database commands and managing collections.
22-
22+
2323
You can construct a database directly using the PHP extension's
24-
``Manager`` class or select a database from the |php-library|'s
25-
:phpclass:`MongoDB\\Client`
26-
class.
27-
24+
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class or
25+
select a database from the |php-library|'s :phpclass:`MongoDB\\Client` class.
26+
2827
:phpclass:`MongoDB\\Database` supports the :php:`readConcern
2928
<mongodb-driver-readconcern>`, :php:`readPreference
3029
<mongodb-driver-readpreference>`, :php:`typeMap
31-
<mongodb.persistence.php#mongodb.persistence.typemaps>`, and
32-
:php:`writeConcern <mongodb-driver-writeconcern>` options.
30+
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`,
31+
and :php:`writeConcern <mongodb-driver-writeconcern>` options.
3332
If you omit an option, the database inherits the value from the
3433
Manager constructor argument or the Client object used to select
3534
the database.
36-
37-
Operations within the ``Database`` class
38-
:phpmethod:`MongoDB\\Database::command` method
39-
inherit the Database's options.
35+
36+
Operations within the :phpclass:`MongoDB\\Database` class inherit the
37+
Database's options.
4038

4139
.. _database-methods:
4240

0 commit comments

Comments
 (0)