1 | <?php |
||
11 | class InlineMinifier implements FilterInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $tagname = ''; |
||
17 | |||
18 | /** |
||
19 | * Initializes the filter instance. |
||
20 | * |
||
21 | * @param string $tagname |
||
22 | */ |
||
23 | public function __construct($tagname = '') |
||
27 | |||
28 | /** |
||
29 | * Filters the specified code. |
||
30 | * |
||
31 | * @param string $code |
||
32 | * @return string |
||
33 | */ |
||
34 | public function filter($code) |
||
54 | |||
55 | /** |
||
56 | * Returns elements by a tag name. |
||
57 | * |
||
58 | * @param string $code |
||
59 | * @return \DOMNodeList |
||
60 | */ |
||
61 | protected function elements($code) |
||
77 | |||
78 | /** |
||
79 | * Minifies the specified code. |
||
80 | * |
||
81 | * @param string $code |
||
82 | * @return string |
||
83 | */ |
||
84 | protected function minify($code) |
||
104 | } |
||
105 |