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 | private function generateImage(MediaInterface $media, array $parameters, $filename) |
||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | private function getTemporaryFile() |
||
122 | } |
||
123 |