| @@ 159-171 (lines=13) @@ | ||
| 156 | /** |
|
| 157 | * @inheritdoc |
|
| 158 | */ |
|
| 159 | public function parseRaw($data, $path) |
|
| 160 | { |
|
| 161 | $this->setPath($path); |
|
| 162 | ||
| 163 | $pathValue = null; |
|
| 164 | if ($this->hasValue($data, $path)) { |
|
| 165 | $pathValue = $this->getValue($data, $path); |
|
| 166 | } |
|
| 167 | ||
| 168 | $this->restorePath(); |
|
| 169 | ||
| 170 | return $pathValue; |
|
| 171 | } |
|
| 172 | ||
| 173 | /** |
|
| 174 | * @inheritdoc |
|
| @@ 176-188 (lines=13) @@ | ||
| 173 | /** |
|
| 174 | * @inheritdoc |
|
| 175 | */ |
|
| 176 | public function parseCallback($data, $path, $callback) |
|
| 177 | { |
|
| 178 | $this->setPath($path); |
|
| 179 | ||
| 180 | $pathValue = null; |
|
| 181 | if ($this->hasValue($data, $path)) { |
|
| 182 | $pathValue = call_user_func($callback, $this->getValue($data, $path)); |
|
| 183 | } |
|
| 184 | ||
| 185 | $this->restorePath(); |
|
| 186 | ||
| 187 | return $pathValue; |
|
| 188 | } |
|
| 189 | ||
| 190 | /** |
|
| 191 | * @inheritdoc |
|