1 | <?php |
||
25 | class JsonReader extends ReaderAbstract |
||
26 | { |
||
27 | /** |
||
28 | * default json error |
||
29 | * |
||
30 | * @var array |
||
31 | * @access protected |
||
32 | * @staticvar |
||
33 | */ |
||
34 | protected static $error = [ |
||
35 | \JSON_ERROR_NONE => 'No error', |
||
36 | \JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', |
||
37 | \JSON_ERROR_STATE_MISMATCH => 'State mismatch (invalid or malformed JSON)', |
||
38 | \JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded', |
||
39 | \JSON_ERROR_SYNTAX => 'Syntax error', |
||
40 | \JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded', |
||
41 | ]; |
||
42 | |||
43 | /** |
||
44 | * {@inheritDoc} |
||
45 | */ |
||
46 | protected static function readFromFile($path) |
||
50 | |||
51 | /** |
||
52 | * {@inheritDoc} |
||
53 | */ |
||
54 | protected static function getError(/*# string */ $path)/*#: string */ |
||
64 | } |
||
65 |