1 | <?php |
||
13 | class Minifier extends Resolver |
||
14 | { |
||
15 | protected $transformers = [ |
||
16 | 'text/javascript' => [__CLASS__, 'js'], |
||
17 | 'text/css' => [__CLASS__, 'css'], |
||
18 | 'text/html' => [__CLASS__, 'html'], |
||
19 | ]; |
||
20 | |||
21 | /** |
||
22 | * Javascript minifier. |
||
23 | * |
||
24 | * @param StreamInterface $input |
||
25 | * @param StreamInterface $output |
||
26 | * |
||
27 | * @return StreamInterface |
||
28 | */ |
||
29 | public static function js(StreamInterface $input, StreamInterface $output) |
||
35 | |||
36 | /** |
||
37 | * CSS minifier. |
||
38 | * |
||
39 | * @param StreamInterface $input |
||
40 | * @param StreamInterface $output |
||
41 | * |
||
42 | * @return StreamInterface |
||
43 | */ |
||
44 | public static function css(StreamInterface $input, StreamInterface $output) |
||
50 | |||
51 | /** |
||
52 | * HTML minifier. |
||
53 | * |
||
54 | * @param StreamInterface $input |
||
55 | * @param StreamInterface $output |
||
56 | * |
||
57 | * @return StreamInterface |
||
58 | */ |
||
59 | public static function html(StreamInterface $input, StreamInterface $output) |
||
65 | } |
||
66 |