1 | <?php |
||
9 | class ImageGenerator |
||
10 | { |
||
11 | /** |
||
12 | * @var Server |
||
13 | */ |
||
14 | private $server; |
||
15 | |||
16 | /** |
||
17 | * @var FilenameGeneratorInterface |
||
18 | */ |
||
19 | private $filenameGenerator; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $tmpPath; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $tmpPrefix; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $fallbackImage; |
||
35 | |||
36 | /** |
||
37 | * @param Server $server |
||
38 | * @param FilenameGeneratorInterface $filenameGenerator |
||
39 | * @param null $fallbackImage |
||
40 | * @param null $tmpPath |
||
41 | * @param null $tmpPrefix |
||
42 | */ |
||
43 | public function __construct( |
||
56 | |||
57 | /** |
||
58 | * @param MediaInterface $media |
||
59 | * @param array $parameters |
||
60 | * @return string |
||
61 | * @throws FilesystemException |
||
62 | */ |
||
63 | public function generate(MediaInterface $media, array $parameters) |
||
73 | |||
74 | /** |
||
75 | * @param MediaInterface $media |
||
76 | * @param array $parameters |
||
77 | * @param $filename |
||
78 | * @throws FilesystemException |
||
79 | * @throws \Exception |
||
80 | */ |
||
81 | protected function generateImage(MediaInterface $media, array $parameters, $filename) |
||
98 | |||
99 | /** |
||
100 | * @param MediaInterface $media |
||
101 | * @return string |
||
102 | * @throws FilesystemException |
||
103 | */ |
||
104 | protected function getImageData(MediaInterface $media) |
||
116 | |||
117 | /** |
||
118 | * @param MediaInterface $media |
||
119 | * @param string $filename |
||
120 | * @param string $tmp |
||
121 | * @param array $parameters |
||
122 | */ |
||
123 | protected function doGenerateImage(MediaInterface $media, $filename, $tmp, array $parameters) |
||
127 | |||
128 | /** |
||
129 | * @return string |
||
130 | */ |
||
131 | protected function getTemporaryFile() |
||
142 | |||
143 | /** |
||
144 | * @return Server |
||
145 | */ |
||
146 | public function getServer() |
||
150 | |||
151 | /** |
||
152 | * @return FilenameGeneratorInterface |
||
153 | */ |
||
154 | public function getFilenameGenerator() |
||
158 | |||
159 | /** |
||
160 | * @return string |
||
161 | */ |
||
162 | public function getTmpPath() |
||
166 | |||
167 | /** |
||
168 | * @return string |
||
169 | */ |
||
170 | public function getTmpPrefix() |
||
174 | |||
175 | /** |
||
176 | * @return string |
||
177 | */ |
||
178 | public function getFallbackImage() |
||
182 | } |
||
183 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.