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 | * @param Server $server |
||
33 | * @param FilenameGeneratorInterface $filenameGenerator |
||
34 | * @param string $tmpPath |
||
35 | * @param string $tmpPrefix |
||
36 | */ |
||
37 | 1 | public function __construct( |
|
48 | |||
49 | /** |
||
50 | * @param MediaInterface $media |
||
51 | * @param array $parameters |
||
52 | * @return string |
||
53 | * @throws FilesystemException |
||
54 | */ |
||
55 | 1 | public function generate(MediaInterface $media, array $parameters) |
|
65 | |||
66 | /** |
||
67 | * @param MediaInterface $media |
||
68 | * @param array $parameters |
||
69 | * @param $filename |
||
70 | * @throws FilesystemException |
||
71 | * @throws \Exception |
||
72 | */ |
||
73 | 1 | private function generateImage(MediaInterface $media, array $parameters, $filename) |
|
87 | |||
88 | /** |
||
89 | * @return string |
||
90 | */ |
||
91 | 1 | private function getTemporaryFile() |
|
102 | } |
||
103 |