1 | <?php |
||
13 | class JsonFileReader { |
||
14 | |||
15 | /** |
||
16 | * @var string|null |
||
17 | */ |
||
18 | private $file = null; |
||
19 | |||
20 | /** |
||
21 | * @var array|null |
||
22 | */ |
||
23 | private $contents = null; |
||
24 | |||
25 | /** |
||
26 | * @since 2.1 |
||
27 | * |
||
28 | * @param string|null $file |
||
29 | */ |
||
30 | public function __construct( $file = null ) { |
||
33 | |||
34 | /** |
||
35 | * @since 2.1 |
||
36 | * |
||
37 | * @param string $file |
||
38 | */ |
||
39 | public function setFile( $file ) { |
||
43 | |||
44 | /** |
||
45 | * @since 2.1 |
||
46 | * |
||
47 | * @return array |
||
48 | * @throws RuntimeException |
||
49 | */ |
||
50 | public function read() { |
||
62 | |||
63 | /** |
||
64 | * @since 2.1 |
||
65 | * |
||
66 | * @return boolean |
||
67 | */ |
||
68 | public function isReadable() { |
||
71 | |||
72 | /** |
||
73 | * @since 2.1 |
||
74 | * |
||
75 | * @return integer |
||
76 | * @throws RuntimeException |
||
77 | */ |
||
78 | public function getModificationTime() { |
||
86 | |||
87 | private function decodeJsonFileContentsToArray( $file ) { |
||
97 | |||
98 | private function printDescriptiveJsonError( $errorCode ) { |
||
113 | |||
114 | } |
||
115 |