1 | <?php |
||
22 | class FilterService |
||
23 | { |
||
24 | /** |
||
25 | * @var DataManager |
||
26 | */ |
||
27 | private $dataManager; |
||
28 | |||
29 | /** |
||
30 | * @var FilterManager |
||
31 | */ |
||
32 | private $filterManager; |
||
33 | |||
34 | /** |
||
35 | * @var CacheManager |
||
36 | */ |
||
37 | private $cacheManager; |
||
38 | |||
39 | /** |
||
40 | * @var LoggerInterface |
||
41 | */ |
||
42 | private $logger; |
||
43 | |||
44 | /** |
||
45 | * @var bool |
||
46 | */ |
||
47 | private $webpGenerate; |
||
48 | |||
49 | /** |
||
50 | * @var mixed[] |
||
51 | */ |
||
52 | private $webpOptions; |
||
53 | |||
54 | public function __construct( |
||
69 | |||
70 | /** |
||
71 | * @param string $path |
||
72 | * @param string $filter |
||
73 | * |
||
74 | * @return bool Returns true if the cache is busted |
||
75 | */ |
||
76 | public function bustCache($path, $filter) |
||
90 | |||
91 | /** |
||
92 | * @param string $path |
||
93 | * @param string $filter |
||
94 | * @param string|null $resolver |
||
95 | * @param bool $forced Force warm up cache |
||
96 | * |
||
97 | * @return bool Returns true if the cache is warmed up |
||
98 | */ |
||
99 | public function warmsUp( |
||
115 | |||
116 | /** |
||
117 | * @param string $path |
||
118 | * @param string $filter |
||
119 | * @param string|null $resolver |
||
120 | * |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getUrlOfFilteredImage($path, $filter, $resolver = null, bool $webpSupported = false) |
||
131 | |||
132 | /** |
||
133 | * @param string $path |
||
134 | * @param string $filter |
||
135 | * @param string|null $resolver |
||
136 | * |
||
137 | * @return string |
||
138 | */ |
||
139 | public function getUrlOfFilteredImageWithRuntimeFilters( |
||
162 | |||
163 | /** |
||
164 | * @param string $source |
||
165 | * @param string $target |
||
166 | * @param mixed[] $options |
||
167 | * |
||
168 | * @return FilterPathContainer[] |
||
169 | */ |
||
170 | private function iterateFilterPathContainers(string $source, string $target = '', array $options = []): array |
||
181 | |||
182 | /** |
||
183 | * @param string $filter |
||
184 | * @param string|null $resolver |
||
185 | * @param bool $webpSupported |
||
186 | * |
||
187 | * @return string |
||
188 | */ |
||
189 | private function resolveFilterPathContainer( |
||
203 | |||
204 | /** |
||
205 | * @param string $filter |
||
206 | * @param string|null $resolver |
||
207 | * @param bool $forced Force warm up cache |
||
208 | * |
||
209 | * @return bool Returns true if the cache is warmed up |
||
210 | */ |
||
211 | public function warmsUpFilterPathContainer( |
||
230 | |||
231 | /** |
||
232 | * @throws NonExistingFilterException |
||
233 | */ |
||
234 | private function createFilteredBinary(FilterPathContainer $filterPathContainer, string $filter): BinaryInterface |
||
251 | } |
||
252 |