Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Commit

Permalink
add getDotOffset method
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo committed Feb 23, 2016
1 parent 0a081bb commit b2d834f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ function count(){
function getArray(){
return (array)$this->data;
}
function getDotOffset($param){
$param = explode('.',$param);
$k = array_shift($param);
if(!isset($this->data[$k]))
return;
$v = $this[$k];
while(null !== $k=array_shift($param)){
if(!isset($v[$k]))
return;
$v = $v[$k];
}
return $v;
}
function __invoke(){
switch(func_num_args()){
case 0:
Expand Down

0 comments on commit b2d834f

Please sign in to comment.