|
@@ 18-18 (lines=1) @@
|
| 15 |
|
|
| 16 |
|
public function traverse($key) { |
| 17 |
|
if (isset($this->data->{$key})) $this->data = $this->data->{$key}; |
| 18 |
|
else if (is_array($this->data) && isset($this->data[$key])) $this->data = $this->data[$key]; |
| 19 |
|
} |
| 20 |
|
|
| 21 |
|
public function read($value) { |
|
@@ 56-58 (lines=3) @@
|
| 53 |
|
if ($autoLookup && isset($this->data->{$last})) { |
| 54 |
|
return $this->data->{$last}; |
| 55 |
|
} |
| 56 |
|
else if (is_array($this->data) && isset($this->data[$last])) { |
| 57 |
|
return $this->data[$last]; |
| 58 |
|
} |
| 59 |
|
throw new \UnexpectedValueException('Not found'); |
| 60 |
|
} |
| 61 |
|
} |