Skip to content

Commit 6ea4bc1

Browse files
committed
Update README
1 parent 537aed4 commit 6ea4bc1

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,20 @@ Parse strings like foo."bar.baz".quux into [ 'foo', 'bar.baz', 'quux' ]
3636
function parse(string $path) : array
3737
```
3838

39-
Parse a given dot notation path into it's parts
39+
Parse a given dot notation path into it's parts
40+
41+
The path is expected to be a string of dot separated keys, where keys can be
42+
quoted with double quotes. Backslashes are used to escape double quotes inside
43+
quoted keys.
44+
45+
##### Examples
46+
47+
- `'foo.bar.baz'` => `[ 'foo', 'bar', 'baz' ]`
48+
- `'foo."bar.baz"'` => `[ 'foo', 'bar.baz' ]`
49+
- `'foo."bar.baz".quux'` => `[ 'foo', 'bar.baz', 'quux' ]`
50+
- `'foo."bar\"baz".quux'` => `[ 'foo', 'bar"baz', 'quux' ]`
51+
52+
**Throws**: `\Quorum\DotNotation\Exceptions\ParseException`
4053

4154
##### Returns:
4255

0 commit comments

Comments
 (0)