1 | <?php |
||
36 | class Toml extends AbstractFileParser |
||
37 | { |
||
38 | /** |
||
39 | * Loads a TOML file as an array. |
||
40 | * |
||
41 | * @param string $path File path |
||
42 | * |
||
43 | * @throws ParseException If there is an error parsing TOML file |
||
44 | * |
||
45 | * @return array The parsed data |
||
46 | * |
||
47 | * @since 0.1.0 |
||
48 | */ |
||
49 | 6 | public function parse($path) |
|
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | * |
||
71 | * @return array Supported extensions |
||
72 | * |
||
73 | * @since 0.1.0 |
||
74 | */ |
||
75 | 3 | public function getSupportedFileExtensions() |
|
79 | |||
80 | /** |
||
81 | * Loads in the given file and parses it. |
||
82 | * |
||
83 | * @param string $file File to load |
||
84 | * |
||
85 | * @return array The parsed file data |
||
86 | * |
||
87 | * @since 0.2.4 |
||
88 | * @codeCoverageIgnore |
||
89 | */ |
||
90 | protected function loadFile($file = null) |
||
97 | |||
98 | /** |
||
99 | * Returns the formatted configuration file contents. |
||
100 | * |
||
101 | * @param array $contents configuration array |
||
102 | * |
||
103 | * @return string formatted configuration file contents |
||
104 | * |
||
105 | * @since 0.2.4 |
||
106 | * @codeCoverageIgnore |
||
107 | */ |
||
108 | protected function exportFormat($contents = null) |
||
114 | |||
115 | /** |
||
116 | * __toString. |
||
117 | * |
||
118 | * @return string |
||
119 | * @since 0.1.2 |
||
120 | * @codeCoverageIgnore |
||
121 | */ |
||
122 | public function __toString() |
||
126 | } |
||
127 | |||
129 |