File tree Expand file tree Collapse file tree 3 files changed +65
-47
lines changed Expand file tree Collapse file tree 3 files changed +65
-47
lines changed Original file line number Diff line number Diff line change @@ -75,18 +75,21 @@ The following example finds and deletes the document with ``restaurant_id`` of
75
75
76
76
The output would then resemble::
77
77
78
- object(stdClass)#14 (4) {
79
- ["_id"]=>
80
- object(MongoDB\BSON\ObjectID)#11 (1) {
81
- ["oid"]=>
82
- string(24) "576023c6b02fa9281da3fad9"
78
+ object(MongoDB\Model\BSONDocument)#17 (1) {
79
+ ["storage":"ArrayObject":private]=>
80
+ array(4) {
81
+ ["_id"]=>
82
+ object(MongoDB\BSON\ObjectID)#11 (1) {
83
+ ["oid"]=>
84
+ string(24) "594d5ef280a846852a4b3f70"
85
+ }
86
+ ["borough"]=>
87
+ string(9) "Manhattan"
88
+ ["name"]=>
89
+ string(15) "Agra Restaurant"
90
+ ["restaurant_id"]=>
91
+ string(8) "40375376"
83
92
}
84
- ["borough"]=>
85
- string(9) "Manhattan"
86
- ["name"]=>
87
- string(15) "Agra Restaurant"
88
- ["restaurant_id"]=>
89
- string(8) "40375376"
90
93
}
91
94
92
95
See Also
Original file line number Diff line number Diff line change @@ -117,23 +117,29 @@ The following operation replaces the document with ``restaurant_id`` of
117
117
118
118
The output would then resemble::
119
119
120
- object(stdClass)#14 (6) {
121
- ["_id"]=>
122
- object(MongoDB\BSON\ObjectID)#11 (1) {
123
- ["oid"]=>
124
- string(24) "576023c7b02fa9281da4139e"
125
- }
126
- ["borough"]=>
127
- string(13) "Staten Island"
128
- ["cuisine"]=>
129
- string(7) "Italian"
130
- ["grades"]=>
131
- array(0) {
120
+ object(MongoDB\Model\BSONDocument)#18 (1) {
121
+ ["storage":"ArrayObject":private]=>
122
+ array(6) {
123
+ ["_id"]=>
124
+ object(MongoDB\BSON\ObjectID)#11 (1) {
125
+ ["oid"]=>
126
+ string(24) "594d5ef380a846852a4b5837"
127
+ }
128
+ ["Borough"]=>
129
+ string(13) "Staten Island"
130
+ ["cuisine"]=>
131
+ string(7) "Italian"
132
+ ["grades"]=>
133
+ object(MongoDB\Model\BSONArray)#17 (1) {
134
+ ["storage":"ArrayObject":private]=>
135
+ array(0) {
136
+ }
137
+ }
138
+ ["name"]=>
139
+ string(22) "Staten Island Pastaria"
140
+ ["restaurant_id"]=>
141
+ string(9) "999999999"
132
142
}
133
- ["name"]=>
134
- string(22) "Staten Island Pastaria"
135
- ["restaurant_id"]=>
136
- string(9) "999999999"
137
143
}
138
144
139
145
See Also
Original file line number Diff line number Diff line change @@ -76,27 +76,36 @@ setting its building number to ``"761"``:
76
76
77
77
The output would then resemble::
78
78
79
- object(stdClass)#16 (2) {
80
- ["_id"]=>
81
- object(MongoDB\BSON\ObjectID)#10 (1) {
82
- ["oid"]=>
83
- string(24) "5813a08d29032c6e72d566a7"
84
- }
85
- ["address"]=>
86
- object(stdClass)#15 (4) {
87
- ["building"]=>
88
- string(3) "761"
89
- ["coord"]=>
90
- array(2) {
91
- [0]=>
92
- float(-73.9925306)
93
- [1]=>
94
- float(40.7309346)
79
+ object(MongoDB\Model\BSONDocument)#20 (1) {
80
+ ["storage":"ArrayObject":private]=>
81
+ array(2) {
82
+ ["_id"]=>
83
+ object(MongoDB\BSON\ObjectID)#12 (1) {
84
+ ["oid"]=>
85
+ string(24) "594d5ef280a846852a4b3dee"
86
+ }
87
+ ["address"]=>
88
+ object(MongoDB\Model\BSONDocument)#19 (1) {
89
+ ["storage":"ArrayObject":private]=>
90
+ array(4) {
91
+ ["building"]=>
92
+ string(3) "761"
93
+ ["coord"]=>
94
+ object(MongoDB\Model\BSONArray)#18 (1) {
95
+ ["storage":"ArrayObject":private]=>
96
+ array(2) {
97
+ [0]=>
98
+ float(-73.9925306)
99
+ [1]=>
100
+ float(40.7309346)
101
+ }
102
+ }
103
+ ["street"]=>
104
+ string(8) "Broadway"
105
+ ["zipcode"]=>
106
+ string(5) "10003"
107
+ }
95
108
}
96
- ["street"]=>
97
- string(8) "Broadway"
98
- ["zipcode"]=>
99
- string(5) "10003"
100
109
}
101
110
}
102
111
You can’t perform that action at this time.
0 commit comments