1 | <?php |
||
9 | class SimpleExcelWriter |
||
10 | { |
||
11 | /** @var \Box\Spout\Writer\WriterInterface */ |
||
12 | private $writer; |
||
13 | |||
14 | private $path = ''; |
||
15 | |||
16 | private $processHeader = true; |
||
17 | |||
18 | private $processingFirstRow = true; |
||
19 | |||
20 | private $numberOfRows = 0; |
||
21 | |||
22 | public static function create(string $file) |
||
26 | |||
27 | public function __construct(string $path) |
||
35 | |||
36 | public function getPath(): string |
||
40 | |||
41 | public function getWriter(): WriterInterface |
||
45 | |||
46 | public function getNumberOfRows(): int |
||
50 | |||
51 | public function noHeaderRow() |
||
57 | |||
58 | /** |
||
59 | * @param \Box\Spout\Common\Entity\Row|array $row |
||
60 | * @param \Box\Spout\Common\Entity\Style\Style|null $style |
||
61 | */ |
||
62 | public function addRow($row, Style $style = null) |
||
79 | |||
80 | protected function writeHeaderFromRow(array $row) |
||
89 | |||
90 | public function close() |
||
94 | |||
95 | public function __destruct() |
||
99 | } |
||
100 |