1 | <?php |
||
16 | class Ini implements FileParserInterface |
||
17 | { |
||
18 | /** |
||
19 | * {@inheritDoc} |
||
20 | * Parses an INI file as an array |
||
21 | * |
||
22 | * @throws ParseException If there is an error parsing the INI file |
||
23 | */ |
||
24 | 6 | public function parse($path) |
|
25 | { |
||
26 | 6 | $data = @parse_ini_file($path, true); |
|
27 | |||
28 | 6 | if (!$data) { |
|
29 | 3 | $error = error_get_last(); |
|
30 | 3 | throw new ParseException($error); |
|
31 | } |
||
32 | |||
33 | 3 | return $data; |
|
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritDoc} |
||
38 | */ |
||
39 | 3 | public function getSupportedExtensions() |
|
43 | } |
||
44 |