1 | <?php |
||
13 | class ReaderEntityFactory |
||
14 | { |
||
15 | /** |
||
16 | * Creates a reader by file extension |
||
17 | * |
||
18 | * @param string $path The path to the spreadsheet file. Supported extensions are .csv, .ods and .xlsx |
||
19 | * @throws \Box\Spout\Common\Exception\UnsupportedTypeException |
||
20 | * @return ReaderInterface |
||
21 | */ |
||
22 | 7 | public static function createReaderFromFile(string $path) |
|
26 | |||
27 | /** |
||
28 | * This creates an instance of a CSV reader |
||
29 | * |
||
30 | * @return \Box\Spout\Reader\CSV\Reader |
||
31 | */ |
||
32 | 1 | public static function createCSVReader() |
|
40 | |||
41 | /** |
||
42 | * This creates an instance of a XLSX reader |
||
43 | * |
||
44 | * @return \Box\Spout\Reader\XLSX\Reader |
||
45 | */ |
||
46 | 47 | public static function createXLSXReader() |
|
54 | |||
55 | /** |
||
56 | * This creates an instance of a ODS reader |
||
57 | * |
||
58 | * @return \Box\Spout\Reader\ODS\Reader |
||
59 | */ |
||
60 | 33 | public static function createODSReader() |
|
68 | } |
||
69 |