Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function query($path) |
||
36 | { |
||
37 | $pathParts = explode('/', $path); |
||
38 | |||
39 | $pointer = &$this->subject; |
||
40 | |||
41 | foreach ($pathParts as $pathPart) { |
||
42 | if (isset($pointer[$pathPart])) { |
||
43 | $pointer = &$pointer[$pathPart]; |
||
44 | } else { |
||
45 | return null; |
||
46 | } |
||
47 | } |
||
48 | |||
49 | return $pointer; |
||
50 | } |
||
51 | } |