1 | <?php |
||
14 | class WriterEntityFactory |
||
15 | { |
||
16 | /** |
||
17 | * This creates an instance of the appropriate writer, given the type of the file to be written |
||
18 | * |
||
19 | * @param string $writerType Type of the writer to instantiate |
||
20 | * @throws \Box\Spout\Common\Exception\UnsupportedTypeException |
||
21 | * @return WriterInterface |
||
22 | */ |
||
23 | 96 | public static function createWriter($writerType) |
|
27 | |||
28 | /** |
||
29 | * This creates an instance of the appropriate writer, given the extension of the file to be written |
||
30 | * |
||
31 | * @param string $path The path to the spreadsheet file. Supported extensions are .csv, .ods and .xlsx |
||
32 | * @throws \Box\Spout\Common\Exception\IOException |
||
33 | * @throws \Box\Spout\Common\Exception\UnsupportedTypeException |
||
34 | * @return WriterInterface |
||
35 | */ |
||
36 | public static function createWriterFromFile(string $path) |
||
40 | |||
41 | /** |
||
42 | * @param Cell[] $cells |
||
43 | * @param Style|null $rowStyle |
||
44 | * @return Row |
||
45 | */ |
||
46 | 2 | public static function createRow(array $cells = [], Style $rowStyle = null) |
|
50 | |||
51 | /** |
||
52 | * @param array $cellValues |
||
53 | * @param Style|null $rowStyle |
||
54 | * @return Row |
||
55 | */ |
||
56 | 78 | public static function createRowFromArray(array $cellValues = [], Style $rowStyle = null) |
|
64 | |||
65 | /** |
||
66 | * @param mixed $cellValue |
||
67 | * @param Style|null $cellStyle |
||
68 | * @return Cell |
||
69 | */ |
||
70 | 2 | public static function createCell($cellValue, Style $cellStyle = null) |
|
74 | } |
||
75 |