1 | <?php |
||
32 | class Reader extends StaticAbstract |
||
33 | { |
||
34 | /** |
||
35 | * supported types |
||
36 | * |
||
37 | * @var string[] |
||
38 | * @access protected |
||
39 | * @staticvar |
||
40 | */ |
||
41 | protected static $supported = ['ini', 'json', 'php', 'xml', 'serialized']; |
||
42 | |||
43 | /** |
||
44 | * Read, parse & return contents from the $path |
||
45 | * |
||
46 | * @param string $path |
||
47 | * @param string $type force this type |
||
48 | * @return mixed |
||
49 | * @throws NotFoundException if $path not found |
||
50 | * @throws RuntimeException if something goes wrong |
||
51 | * @access public |
||
52 | * @since 2.0.16 added $type param |
||
53 | * @static |
||
54 | */ |
||
55 | public static function readFile( |
||
73 | |||
74 | /** |
||
75 | * Is this type supported |
||
76 | * |
||
77 | * @param string $type |
||
78 | * @return bool |
||
79 | * @access public |
||
80 | * @static |
||
81 | */ |
||
82 | public static function isSupported(/*# string */ $type)/*# : bool */ |
||
86 | } |
||
87 |