1 | <?php |
||
20 | final class InvoicePdfFileGenerator implements FileGeneratorInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var GeneratorInterface |
||
24 | */ |
||
25 | private $pdfFileGenerator; |
||
26 | |||
27 | /** |
||
28 | * @var EngineInterface |
||
29 | */ |
||
30 | private $templatingEngine; |
||
31 | |||
32 | /** |
||
33 | * @var CompanyDataResolverInterface |
||
34 | */ |
||
35 | private $companyDataResolver; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | private $filesPath; |
||
41 | |||
42 | /** |
||
43 | * @param GeneratorInterface $pdfFileGenerator |
||
44 | * @param EngineInterface $templatingEngine |
||
45 | * @param CompanyDataResolverInterface $companyDataResolver |
||
46 | * @param string $filesPath |
||
47 | */ |
||
48 | public function __construct( |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function generateFile(InvoiceInterface $invoice): string |
||
78 | |||
79 | /** |
||
80 | * @param InvoiceInterface $invoice |
||
81 | * @return string Returns an explicit invoice file name |
||
82 | */ |
||
83 | protected function getInvoiceFilename(InvoiceInterface $invoice): string |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function getFilesPath(): string |
||
101 | } |
||
102 |