1 | <?php |
||
14 | class Finalizer |
||
15 | { |
||
16 | /** |
||
17 | * @var Sheet |
||
18 | */ |
||
19 | private $sheet; |
||
20 | |||
21 | /** |
||
22 | * @var SheetFile |
||
23 | */ |
||
24 | private $sheetFile; |
||
25 | |||
26 | /** |
||
27 | * @var \ZipArchive |
||
28 | */ |
||
29 | private $zip; |
||
30 | |||
31 | /** |
||
32 | * @var Styler |
||
33 | */ |
||
34 | private $styler; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $encoding; |
||
40 | |||
41 | /** |
||
42 | * Finalizer constructor. |
||
43 | * |
||
44 | * @param Sheet $sheet |
||
45 | * @param Styler $styler |
||
46 | * @param SheetFile $sheetFile |
||
47 | * @param string $encoding |
||
48 | */ |
||
49 | 1 | public function __construct(Sheet $sheet, Styler $styler, SheetFile $sheetFile, $encoding) |
|
57 | |||
58 | /** |
||
59 | * Finalize the xlsx file. |
||
60 | * |
||
61 | * @param string $fileName |
||
62 | */ |
||
63 | 1 | public function finalize($fileName) |
|
71 | |||
72 | /** |
||
73 | * Wrap up the sheet (write header, column xmls). |
||
74 | */ |
||
75 | 1 | private function finalizeSheet() |
|
86 | |||
87 | /** |
||
88 | * Write column widths xml string. |
||
89 | */ |
||
90 | 1 | private function writeColumnWidths() |
|
103 | |||
104 | /** |
||
105 | * Write style xml file. |
||
106 | */ |
||
107 | 1 | private function finalizeStyles() |
|
111 | |||
112 | /** |
||
113 | * Add default xmls to zip archive. |
||
114 | */ |
||
115 | 1 | private function finalizeDefaultXmls() |
|
125 | } |
||
126 |