1 | <?php |
||
17 | class WriterFactory |
||
18 | { |
||
19 | /** |
||
20 | * This creates an instance of the appropriate writer, given the type of the file to be read |
||
21 | * |
||
22 | * @api |
||
23 | * @param string $writerType Type of the writer to instantiate |
||
24 | * @return WriterInterface |
||
25 | * @throws \Box\Spout\Common\Exception\UnsupportedTypeException |
||
26 | */ |
||
27 | 113 | public static function create($writerType) |
|
49 | |||
50 | /** |
||
51 | * @return CSV\Writer |
||
52 | */ |
||
53 | 13 | private static function getCSVWriter() |
|
59 | |||
60 | /** |
||
61 | * @return XLSX\Writer |
||
62 | */ |
||
63 | 51 | private static function getXLSXWriter() |
|
70 | |||
71 | /** |
||
72 | * @return ODS\Writer |
||
73 | */ |
||
74 | 48 | private static function getODSWriter() |
|
81 | } |
||
82 |