1 | <?php |
||
10 | class JsonService extends AbstractService { |
||
11 | |||
12 | /** |
||
13 | * Reads a file and decodes json |
||
14 | * |
||
15 | * @param string $filename |
||
16 | * @throws FileNotFoundException |
||
17 | * @throws JsonEmptyException |
||
18 | * @throws \RuntimeException |
||
19 | * @return array |
||
20 | 1 | */ |
|
21 | public function read($filename) { |
||
39 | |||
40 | /** |
||
41 | * Encodes contents to json and writes them into the given filename |
||
42 | * |
||
43 | * @param string $filename |
||
44 | * @param array $contents |
||
45 | 16 | */ |
|
46 | 16 | public function write($filename, $contents) { |
|
56 | } |