1 | <?php |
||
16 | abstract class MinifyComponent |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * @var View |
||
21 | */ |
||
22 | protected $view; |
||
23 | |||
24 | /** |
||
25 | * MinifyComponent constructor. |
||
26 | * @param View $view |
||
27 | */ |
||
28 | 8 | public function __construct(View $view) |
|
29 | { |
||
30 | 8 | $this->view = $view; |
|
31 | 8 | } |
|
32 | |||
33 | abstract public function export(); |
||
34 | |||
35 | /** |
||
36 | * @param string $file |
||
37 | * @return string |
||
38 | */ |
||
39 | 7 | protected function getAbsoluteFilePath($file) |
|
43 | |||
44 | /** |
||
45 | * @param string $file |
||
46 | * @return string |
||
47 | */ |
||
48 | 7 | protected function cleanFileName($file) |
|
54 | |||
55 | /** |
||
56 | * @param string $file |
||
57 | * @param string $html |
||
58 | * @return bool |
||
59 | */ |
||
60 | 7 | protected function thisFileNeedMinify($file, $html) |
|
66 | |||
67 | /** |
||
68 | * @param string $url |
||
69 | * @param boolean $checkSlash |
||
70 | * @return bool |
||
71 | */ |
||
72 | protected function isUrl($url, $checkSlash = true) |
||
85 | |||
86 | /** |
||
87 | * @param string $string |
||
88 | * @return bool |
||
89 | */ |
||
90 | 7 | protected function isContainsConditionalComment($string) |
|
94 | |||
95 | /** |
||
96 | * @param string $file |
||
97 | * @return bool |
||
98 | */ |
||
99 | 7 | protected function isExcludedFile($file) |
|
103 | |||
104 | /** |
||
105 | * @param string $resultFile |
||
106 | * @return string |
||
107 | */ |
||
108 | 7 | protected function prepareResultFile($resultFile) |
|
120 | |||
121 | /** |
||
122 | * @param array $files |
||
123 | * @return string |
||
124 | */ |
||
125 | 7 | protected function _getSummaryFilesHash($files) |
|
146 | } |
||
147 |