1 | <?php |
||
10 | class SimpleExcelWriter |
||
11 | { |
||
12 | /** @var \Box\Spout\Writer\WriterInterface */ |
||
13 | private $writer; |
||
14 | |||
15 | private $processHeader = true; |
||
16 | |||
17 | private $processingFirstRow = true; |
||
18 | |||
19 | public static function create(string $file) |
||
23 | |||
24 | public function __construct(string $path) |
||
30 | |||
31 | public function getWriter(): WriterInterface |
||
35 | |||
36 | public function noTitleRow() |
||
37 | { |
||
38 | $this->processHeader = false; |
||
39 | |||
40 | return $this; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @param \Box\Spout\Common\Entity\Row|array $row |
||
45 | * @param \Box\Spout\Common\Entity\Style\Style|null $style |
||
46 | */ |
||
47 | public function addRow($row, Style $style = null) |
||
64 | |||
65 | protected function writeHeaderFromRow(array $row) |
||
73 | |||
74 | public function __destruct() |
||
78 | } |
||
79 |