@@ -19,12 +19,36 @@ BSON spec, see `bsonspec.org <http://bsonspec.org/>`_.
19
19
20
20
By default, the |php-library| returns BSON documents as
21
21
:phpclass:`MongoDB\\Model\\BSONDocument` objects and BSON arrays as
22
- :phpclass:`MongoDB\\Model\\BSONArray` objects.
23
- :phpclass:`BSONDocument <MongoDB\\Model\\BSONDocument>` and
24
- :phpclass:`BSONArray <MongoDB\\Model\\BSONArray>` extend PHP's
25
- :php:`ArrayObject <arrayobject>` class and implement the driver's
26
- :php:`MongoDB\\BSON\\Serializable <mongodb-bson-serializable>` and
27
- :php:`MongoDB\\BSON\\Unserializable <mongodb-bson-unserializable>` interfaces.
22
+ :phpclass:`MongoDB\\Model\\BSONArray` objects, respectively.
23
+
24
+ BSON Classes
25
+ ------------
26
+
27
+ .. phpclass:: MongoDB\\Model\\BSONArray
28
+
29
+ This class extends PHP's :php:`ArrayObject <arrayobject>` class. It also
30
+ implements PHP's :php:`JsonSerializable <jsonserializable>` interface and the
31
+ driver's :php:`MongoDB\\BSON\\Serializable <mongodb-bson-serializable>` and
32
+ :php:`MongoDB\\BSON\\Unserializable <mongodb-bson-unserializable>`
33
+ interfaces.
34
+
35
+ By default, the library will deserialize BSON arrays as instances of this
36
+ class. During BSON and JSON serialization, instances of this class will
37
+ serialize as an array type (:php:`array_values() <array_values>` is used
38
+ internally to numerically reindex the array).
39
+
40
+ .. phpclass:: MongoDB\\Model\\BSONDocument
41
+
42
+ This class extends PHP's :php:`ArrayObject <arrayobject>` class. It also
43
+ implements PHP's :php:`JsonSerializable <jsonserializable>` interface and the
44
+ driver's :php:`MongoDB\\BSON\\Serializable <mongodb-bson-serializable>` and
45
+ :php:`MongoDB\\BSON\\Unserializable <mongodb-bson-unserializable>`
46
+ interfaces.
47
+
48
+ By default, the library will deserialize BSON documents as instances of this
49
+ class. During BSON and JSON serialization, instances of this class will
50
+ serialize as a document type (:php:`object casting
51
+ <types.type-juggling#language.types.typecasting>` is used internally).
28
52
29
53
Type Maps
30
54
---------
0 commit comments