1 | <?php |
||
26 | class DownloadProcessor |
||
27 | { |
||
28 | /** |
||
29 | * @var DownloadResourceResolver |
||
30 | */ |
||
31 | private $downloadResourceResolver; |
||
32 | |||
33 | /** |
||
34 | * @var FileFactory |
||
35 | */ |
||
36 | private $fileFactory; |
||
37 | |||
38 | /** |
||
39 | * @var RawFactory |
||
40 | */ |
||
41 | private $rawFactory; |
||
42 | |||
43 | /** |
||
44 | * @var File |
||
45 | */ |
||
46 | private $file; |
||
47 | |||
48 | /** |
||
49 | * DownloadProcessor constructor. |
||
50 | * @param DownloadResourceResolver $downloadResourceResolver |
||
51 | * @param FileFactory $fileFactory |
||
52 | * @param RawFactory $rawFactory |
||
53 | * @param File $file |
||
54 | */ |
||
55 | public function __construct( |
||
66 | |||
67 | /** |
||
68 | * @param AttachmentInterface $attachment |
||
69 | * @return Raw |
||
70 | * @throws FileSystemException |
||
71 | */ |
||
72 | public function processDownload(AttachmentInterface $attachment): Raw |
||
86 | |||
87 | /** |
||
88 | * @param AttachmentInterface $attachment |
||
89 | * @return string |
||
90 | * @throws FileSystemException |
||
91 | */ |
||
92 | private function readFile(AttachmentInterface $attachment): string |
||
101 | } |