1 | <?php |
||
15 | class Reader extends AbstractReader |
||
16 | { |
||
17 | /** @var \ZipArchive */ |
||
18 | protected $zip; |
||
19 | |||
20 | /** @var \Box\Spout\Reader\XLSX\Helper\SharedStringsHelper Helper to work with shared strings */ |
||
21 | protected $sharedStringsHelper; |
||
22 | |||
23 | /** @var SheetIterator To iterator over the XLSX sheets */ |
||
24 | protected $sheetIterator; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * Returns the reader's current options |
||
29 | * |
||
30 | * @return ReaderOptions |
||
31 | */ |
||
32 | 111 | protected function getOptions() |
|
39 | |||
40 | /** |
||
41 | * @param string $tempFolder Temporary folder where the temporary files will be created |
||
42 | * @return Reader |
||
43 | */ |
||
44 | public function setTempFolder($tempFolder) |
||
49 | |||
50 | /** |
||
51 | * Returns whether stream wrappers are supported |
||
52 | * |
||
53 | * @return bool |
||
54 | */ |
||
55 | 6 | protected function doesSupportStreamWrapper() |
|
59 | |||
60 | /** |
||
61 | * Opens the file at the given file path to make it ready to be read. |
||
62 | * It also parses the sharedStrings.xml file to get all the shared strings available in memory |
||
63 | * and fetches all the available sheets. |
||
64 | * |
||
65 | * @param string $filePath Path of the file to be read |
||
66 | * @return void |
||
67 | * @throws \Box\Spout\Common\Exception\IOException If the file at the given path or its content cannot be read |
||
68 | * @throws \Box\Spout\Reader\Exception\NoSheetsFoundException If there are no sheets in the file |
||
69 | */ |
||
70 | 108 | protected function openReader($filePath) |
|
87 | |||
88 | /** |
||
89 | * Returns an iterator to iterate over sheets. |
||
90 | * |
||
91 | * @return SheetIterator To iterate over sheets |
||
92 | */ |
||
93 | 96 | protected function getConcreteSheetIterator() |
|
97 | |||
98 | /** |
||
99 | * Closes the reader. To be used after reading the file. |
||
100 | * |
||
101 | * @return void |
||
102 | */ |
||
103 | 93 | protected function closeReader() |
|
113 | } |
||
114 |