Skip to content

Commit 3388c2f

Browse files
committed
Add chaining example
1 parent aab96d5 commit 3388c2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ $dot = dot($array);
7070
$dot = dot($array, true);
7171
```
7272

73+
All methods not returning a specific value returns the Dot object for chaining:
74+
```php
75+
$dot = dot();
76+
77+
$dot->add('user.name', 'John')->set('user.email', '[email protected]')->clear(); // returns empty Dot
78+
```
79+
7380
## Methods
7481

7582
Dot has the following methods:

0 commit comments

Comments
 (0)