| @@ 127-138 (lines=12) @@ | ||
| 124 | return $this->storage->exists($path); |
|
| 125 | } |
|
| 126 | ||
| 127 | private function encode(stdClass $jsonData, $path) |
|
| 128 | { |
|
| 129 | try { |
|
| 130 | return $this->jsonEncoder->encode($jsonData); |
|
| 131 | } catch (EncodingFailedException $e) { |
|
| 132 | throw new InvalidConfigException(sprintf( |
|
| 133 | 'The configuration in %s could not be encoded: %s', |
|
| 134 | $path, |
|
| 135 | $e->getMessage() |
|
| 136 | ), 0, $e); |
|
| 137 | } |
|
| 138 | } |
|
| 139 | ||
| 140 | private function decode($json, $path) |
|
| 141 | { |
|
| @@ 241-252 (lines=12) @@ | ||
| 238 | $this->storage->write($path, $json); |
|
| 239 | } |
|
| 240 | ||
| 241 | private function encode(stdClass $jsonData, $path) |
|
| 242 | { |
|
| 243 | try { |
|
| 244 | return $this->jsonEncoder->encode($jsonData); |
|
| 245 | } catch (EncodingFailedException $e) { |
|
| 246 | throw new InvalidConfigException(sprintf( |
|
| 247 | 'The configuration in %s could not be encoded: %s', |
|
| 248 | $path, |
|
| 249 | $e->getMessage() |
|
| 250 | ), 0, $e); |
|
| 251 | } |
|
| 252 | } |
|
| 253 | ||
| 254 | private function decode($json, $path) |
|
| 255 | { |
|