1 | <?php |
||
17 | class MinifyHtmlExtension extends \Twig_Extension |
||
|
|||
18 | { |
||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $options = [ |
||
23 | 'is_safe' => ['html'], |
||
24 | 'needs_environment' => true, |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * @var callable |
||
29 | */ |
||
30 | private $callable; |
||
31 | |||
32 | /** |
||
33 | * @var HtmlMin |
||
34 | */ |
||
35 | private $minifier; |
||
36 | |||
37 | /** |
||
38 | * @var bool |
||
39 | */ |
||
40 | private $forceCompression = false; |
||
41 | |||
42 | /** |
||
43 | * MinifyHtmlExtension constructor. |
||
44 | * |
||
45 | * @param HtmlMin $htmlMin |
||
46 | * @param bool $forceCompression Default: false. Forces compression regardless of Twig's debug setting. |
||
47 | */ |
||
48 | 9 | public function __construct(HtmlMin $htmlMin, bool $forceCompression = false) |
|
54 | |||
55 | /** |
||
56 | * @param Twig_Environment $twig |
||
57 | * @param string $html |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | 9 | public function compress(Twig_Environment $twig, $html) |
|
90 | |||
91 | /** @noinspection PhpMissingParentCallCommonInspection */ |
||
92 | /** |
||
93 | * @return array |
||
94 | */ |
||
95 | 6 | public function getFilters(): array |
|
101 | |||
102 | /** @noinspection PhpMissingParentCallCommonInspection */ |
||
103 | 6 | public function getFunctions(): array |
|
109 | |||
110 | /** @noinspection PhpMissingParentCallCommonInspection */ |
||
111 | 6 | public function getTokenParsers(): array |
|
117 | |||
118 | /** |
||
119 | * @param \Twig_Environment $twig |
||
120 | * |
||
121 | * @return bool |
||
122 | */ |
||
123 | 9 | public function isCompressionActive(Twig_Environment $twig): bool |
|
129 | } |
||
130 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.