1 | <?php |
||
8 | final class JSONFileReader implements FileReader |
||
9 | { |
||
10 | const JSON_ERRORS = [ |
||
11 | JSON_ERROR_NONE => null, |
||
12 | JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', |
||
13 | JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch', |
||
14 | JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', |
||
15 | JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON', |
||
16 | JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded', |
||
17 | ]; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $filename; |
||
23 | |||
24 | public function read($filename) |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | private function getJsonError() |
||
50 | } |
||
51 |