1 | <?php |
||
13 | class ScriptHandler |
||
14 | { |
||
15 | const CONFIG_MAIN_KEY = 'css-compiler'; |
||
16 | const OPTION_KEY_INPUT = 'input'; |
||
17 | const OPTION_KEY_OUTPUT = 'output'; |
||
18 | const OPTION_KEY_FORMATTER = 'format'; |
||
19 | const DEFAULT_OPTION_FORMATTER = 'compact'; |
||
20 | protected static $mandatoryOptions = [ |
||
21 | self::OPTION_KEY_INPUT, |
||
22 | self::OPTION_KEY_OUTPUT |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * @param Event $event |
||
27 | * |
||
28 | * @throws \InvalidArgumentException |
||
29 | */ |
||
30 | public static function generateCSS(Event $event) |
||
49 | |||
50 | /** |
||
51 | * @param array $config |
||
52 | * |
||
53 | * @return bool |
||
54 | * @throws \InvalidArgumentException |
||
55 | */ |
||
56 | protected static function validateConfiguration(array $config) |
||
68 | |||
69 | /** |
||
70 | * @param array $config |
||
71 | * |
||
72 | * @return bool |
||
73 | * @throws \InvalidArgumentException |
||
74 | */ |
||
75 | protected static function validateOptions(array $config) |
||
87 | |||
88 | |||
89 | /** |
||
90 | * @param array $config |
||
91 | * |
||
92 | * @return bool |
||
93 | * @throws \InvalidArgumentException |
||
94 | */ |
||
95 | protected static function validateMandatoryOptions(array $config) |
||
107 | /** |
||
108 | * @param array $config |
||
109 | * |
||
110 | * @return bool |
||
111 | */ |
||
112 | protected static function validateInputOption(array $config) |
||
120 | |||
121 | /** |
||
122 | * @param array $config |
||
123 | * |
||
124 | * @return bool |
||
125 | */ |
||
126 | protected static function validateOutputOption(array $config) |
||
134 | } |
||
135 |