@@ -17,35 +17,37 @@ Definition
17
17
18
18
Provides methods for common operations on collections and documents,
19
19
including CRUD operations and index management.
20
-
20
+
21
21
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
+
27
28
:phpclass:`MongoDB\\Collection` supports the :php:`readConcern
28
29
<mongodb-driver-readconcern>`, :php:`readPreference
29
30
<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.
32
33
If you omit an option, the collection inherits the value from the
33
34
Manager constructor argument or the Database object used to select
34
35
the collection.
35
36
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
41
42
: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.
49
51
50
52
51
53
Methods
0 commit comments