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