@@ -52,7 +52,7 @@ Create a BSON Document
52
52
53
53
You can create a BSON document by using the same notation you use to create an
54
54
associative array in {+language+}. The {+library-short+} automatically converts
55
- {+language+} arrays into BSON documents when inserting them into a collection.
55
+ these values into BSON documents when inserting them into a collection.
56
56
57
57
The following example creates a BSON document that represents the preceding
58
58
:ref:`sample BSON document <php-bson-sample>`:
@@ -71,7 +71,6 @@ modify an associative array in {+language+}. This example makes the following ch
71
71
to the :ref:`sample BSON document <php-bson-sample>`:
72
72
73
73
- Adds a new ``restaurant_id`` field that has a value of ``12345``
74
- - Removes the ``cuisine`` field
75
74
- Sets the value of the ``name`` field to ``"Mongo's Pizza Place"``
76
75
77
76
.. literalinclude:: /includes/bson.php
@@ -127,8 +126,8 @@ This type map performs the following conversions:
127
126
- Top-level and embedded BSON documents to ``MongoDB\Model\BSONDocument`` objects
128
127
129
128
A type map can specify any class that implements
130
- :php:`MongoDB\BSON\Unserializable <mongodb-bson-unserializable>`, as well as
131
- the ``array``, ``stdClass``, and ``object`` types.
129
+ :php:`MongoDB\BSON\Unserializable <mongodb-bson-unserializable>`. It can
130
+ also specify the ``array``, ``stdClass``, and ``object`` types.
132
131
133
132
Custom Type Map Example
134
133
```````````````````````
@@ -259,7 +258,7 @@ methods:
259
258
API Documentation
260
259
-----------------
261
260
262
- To learn more about any of the methods or types discussed in this
261
+ To learn more about any of the {+library-short+} methods or types discussed in this
263
262
guide, see the following library API documentation:
264
263
265
264
- :phpmethod:`MongoDB\Database::createCollection()`
0 commit comments