@@ -112,7 +112,7 @@ DotArray::create(['config' => ['some.dotted.key' => 'value']])->get('config.{som
112
112
// Multiple keys.
113
113
$dot->clear([
114
114
' books.{sci-fi & fantasy}' ,
115
- ' books.{childre \' s books}'
115
+ ' books.{children \' s books}'
116
116
]);
117
117
118
118
// Vanilla PHP.
@@ -125,7 +125,7 @@ DotArray::create(['config' => ['some.dotted.key' => 'value']])->get('config.{som
125
125
- ```php
126
126
$dot->delete(' books.{sci-fi & fantasy}' );
127
127
$dot->delete(' books.{sci-fi & fantasy}.0.name' );
128
- $dot->delete([' books.{sci-fi & fantasy}.0' , ' books.{childre \' s books}.0' ]);
128
+ $dot->delete([' books.{sci-fi & fantasy}.0' , ' books.{children \' s books}.0' ]);
129
129
```
130
130
131
131
- **merge**:
@@ -160,7 +160,7 @@ DotArray::create(['config' => ['some.dotted.key' => 'value']])->get('config.{som
160
160
The signature of the callable must be: `function ($value, $key)`.
161
161
162
162
- ```php
163
- $book = $dot->get(' books.{childre \' s books}' )->find(function ($value, $key) {
163
+ $book = $dot->get(' books.{children \' s books}' )->find(function ($value, $key) {
164
164
return $value[' price' ] > 0;
165
165
});
166
166
```
@@ -170,7 +170,7 @@ DotArray::create(['config' => ['some.dotted.key' => 'value']])->get('config.{som
170
170
The signature of the callable must be: `function ($value, $key)`
171
171
172
172
- ```php
173
- $books = $dot->get(' books.{childre \' s books}' )->filter(function ($value, $key) {
173
+ $books = $dot->get(' books.{children \' s books}' )->filter(function ($value, $key) {
174
174
return $value[' name' ] === ' Harry Potter and the Order of the Phoenix' ;
175
175
});
176
176
@@ -195,13 +195,13 @@ DotArray::create(['config' => ['some.dotted.key' => 'value']])->get('config.{som
195
195
- [ not-between ]
196
196
*/
197
197
// Example 1.
198
- $books = $dot->get(' books.{childre \' s books}' )->filterBy(' price' , ' between' , 5, 12);
198
+ $books = $dot->get(' books.{children \' s books}' )->filterBy(' price' , ' between' , 5, 12);
199
199
200
200
// Example 2.
201
- $books = $dot->get(' books.{childre \' s books}' )->filterBy(' price' , ' > ' , 10);
201
+ $books = $dot->get(' books.{children \' s books}' )->filterBy(' price' , ' > ' , 10);
202
202
203
203
// Example 3.
204
- $books = $dot->get(' books.{childre \' s books}' )->filterBy(' price' , ' in' , [8.5, 15.49]);
204
+ $books = $dot->get(' books.{children \' s books}' )->filterBy(' price' , ' in' , [8.5, 15.49]);
205
205
```
206
206
207
207
- **where**:
@@ -227,16 +227,16 @@ DotArray::create(['config' => ['some.dotted.key' => 'value']])->get('config.{som
227
227
*/
228
228
229
229
// Example 1. (using the signature: [property, comparisonOperator, ...value])
230
- $books = $dot->get(' books.{childre \' s books}' )->where([' price' , ' between' , 5, 12]);
230
+ $books = $dot->get(' books.{children \' s books}' )->where([' price' , ' between' , 5, 12]);
231
231
232
232
// Example 2. (using the signature: [property, comparisonOperator, ...value])
233
- $books = $dot->get(' books.{childre \' s books}' )->where([' price' , ' > ' , 10]);
233
+ $books = $dot->get(' books.{children \' s books}' )->where([' price' , ' > ' , 10]);
234
234
235
235
// Example 3. (using the signature: [property, comparisonOperator, ...value])
236
- $books = $dot->get(' books.{childre \' s books}' )->where([' price' , ' in' , [8.5, 15.49]]);
236
+ $books = $dot->get(' books.{children \' s books}' )->where([' price' , ' in' , [8.5, 15.49]]);
237
237
238
238
// Example 4. (using the signature: \Closure)
239
- $books = $dot->get(' books.{childre \' s books}' )->where(function ($value, $key) {
239
+ $books = $dot->get(' books.{children \' s books}' )->where(function ($value, $key) {
240
240
return $value[' name' ] === ' Harry Potter and the Order of the Phoenix' ;
241
241
});
242
242
```
@@ -337,7 +337,7 @@ $dummyArray = [
337
337
],
338
338
],
339
339
340
- ' childre \' s books' =>
340
+ ' children \' s books' =>
341
341
[
342
342
[
343
343
' name' => ' Harry Potter and the Order of the Phoenix' ,
0 commit comments