Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
codeliner committed Jul 5, 2014
1 parent ab41c99 commit 2ee2cbd
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Installation of codeliner\array-reader uses composer. For composer documentation
Add following requirement to your composer.json

```sh
"codeliner/array-reader" : "1.0.*"
"codeliner/array-reader" : "~1.0"
```

## Usage
Expand Down Expand Up @@ -52,6 +52,23 @@ $arrayReader = new ArrayReader(
echo $arrayReader->stringValue('hash.not.existing.path', 'defaultString'));

//Output: defaultString


//If a key in your array contains a dot you escape it in the path with a backslash

$arrayReader = new ArrayReader(
array(
'hash' => array(
'with.dot.key' => array(
'nested' => 'value'
)
)
)
);

echo $arrayReader->stringValue('hash.with\.dot\.key.nested'));

//Output: value
```


0 comments on commit 2ee2cbd

Please sign in to comment.