1 | <?php |
||
7 | class Parser |
||
8 | { |
||
9 | private static $arrayTypes = [ |
||
10 | 'After', |
||
11 | 'Before', |
||
12 | 'Requires', |
||
13 | 'Conflicts', |
||
14 | 'WantedBy', |
||
15 | 'Names', |
||
16 | 'Wants', |
||
17 | 'RequiredBy', |
||
18 | 'RequiredByOverridable', |
||
19 | 'RequiresMountsFor', |
||
20 | 'ReadWritePaths', |
||
21 | 'ReadOnlyPaths', |
||
22 | 'DropInPaths', |
||
23 | 'ConflictedBy', |
||
24 | 'Documentation', |
||
25 | 'BindsTo', |
||
26 | 'Triggers', |
||
27 | 'Features', |
||
28 | 'UnitPath', |
||
29 | 'BoundBy', |
||
30 | ]; |
||
31 | |||
32 | private static $execTypes = [ |
||
33 | 'ExecReload', |
||
34 | 'ExecStartPre', |
||
35 | 'ExecStart', |
||
36 | 'ExecStartPost', |
||
37 | 'ExecStop', |
||
38 | 'ExecStopPost', |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * @param array $values |
||
43 | * @return array|bool|ExecCommand|\DateTimeImmutable|int|mixed|null |
||
44 | */ |
||
45 | public static function parseValueByContent(array $values) |
||
89 | |||
90 | /** |
||
91 | * @param string $line |
||
92 | * @return ExecCommand |
||
93 | */ |
||
94 | private static function parseExecLine(string $line): ExecCommand |
||
117 | |||
118 | /** |
||
119 | * @param array $values |
||
120 | * @return array |
||
121 | */ |
||
122 | private static function parseExecDetail(array $values): array |
||
163 | |||
164 | /** |
||
165 | * @param array $values |
||
166 | * @return array |
||
167 | */ |
||
168 | private static function parseEnvironmentLine(array $values): array |
||
180 | |||
181 | /** |
||
182 | * Used by PHPUnit |
||
183 | * |
||
184 | * @return array |
||
185 | */ |
||
186 | public static function getArrayTypes(): array |
||
190 | |||
191 | /** |
||
192 | * Used by PHPUnit |
||
193 | * |
||
194 | * @return array |
||
195 | */ |
||
196 | public static function getExecTypes(): array |
||
200 | } |
||
201 |