1 | <?php |
||
20 | class Reader extends ReaderAbstract |
||
21 | { |
||
22 | /** @var HelperFactory */ |
||
23 | protected $helperFactory; |
||
24 | |||
25 | /** @var \ZipArchive */ |
||
26 | protected $zip; |
||
27 | |||
28 | /** @var \Box\Spout\Reader\XLSX\Helper\SharedStringsHelper Helper to work with shared strings */ |
||
29 | protected $sharedStringsHelper; |
||
30 | |||
31 | /** @var SheetIterator To iterator over the XLSX sheets */ |
||
32 | protected $sheetIterator; |
||
33 | |||
34 | |||
35 | /** |
||
36 | * @param OptionsManagerInterface $optionsManager |
||
37 | * @param GlobalFunctionsHelper $globalFunctionsHelper |
||
38 | * @param EntityFactoryInterface $entityFactory |
||
39 | * @param HelperFactory $helperFactory |
||
40 | */ |
||
41 | 39 | public function __construct( |
|
50 | |||
51 | /** |
||
52 | * @param string $tempFolder Temporary folder where the temporary files will be created |
||
53 | * @return Reader |
||
54 | */ |
||
55 | public function setTempFolder($tempFolder) |
||
60 | |||
61 | /** |
||
62 | * Returns whether stream wrappers are supported |
||
63 | * |
||
64 | * @return bool |
||
65 | */ |
||
66 | 2 | protected function doesSupportStreamWrapper() |
|
70 | |||
71 | /** |
||
72 | * Opens the file at the given file path to make it ready to be read. |
||
73 | * It also parses the sharedStrings.xml file to get all the shared strings available in memory |
||
74 | * and fetches all the available sheets. |
||
75 | * |
||
76 | * @param string $filePath Path of the file to be read |
||
77 | * @return void |
||
78 | * @throws \Box\Spout\Common\Exception\IOException If the file at the given path or its content cannot be read |
||
79 | * @throws \Box\Spout\Reader\Exception\NoSheetsFoundException If there are no sheets in the file |
||
80 | */ |
||
81 | 36 | protected function openReader($filePath) |
|
102 | |||
103 | /** |
||
104 | * Returns an iterator to iterate over sheets. |
||
105 | * |
||
106 | * @return SheetIterator To iterate over sheets |
||
107 | */ |
||
108 | 33 | protected function getConcreteSheetIterator() |
|
112 | |||
113 | /** |
||
114 | * Closes the reader. To be used after reading the file. |
||
115 | * |
||
116 | * @return void |
||
117 | */ |
||
118 | 32 | protected function closeReader() |
|
128 | } |
||
129 |