1 | <?php |
||
18 | class Reader extends ReaderAbstract |
||
19 | { |
||
20 | /** @var ManagerFactory */ |
||
21 | protected $managerFactory; |
||
22 | |||
23 | /** @var \ZipArchive */ |
||
24 | protected $zip; |
||
25 | |||
26 | /** @var \Box\Spout\Reader\XLSX\Manager\SharedStringsManager Manages shared strings */ |
||
27 | protected $sharedStringsManager; |
||
28 | |||
29 | /** @var SheetIterator To iterator over the XLSX sheets */ |
||
30 | protected $sheetIterator; |
||
31 | |||
32 | /** |
||
33 | * @param OptionsManagerInterface $optionsManager |
||
34 | * @param GlobalFunctionsHelper $globalFunctionsHelper |
||
35 | * @param InternalEntityFactoryInterface $entityFactory |
||
36 | * @param ManagerFactory $managerFactory |
||
37 | */ |
||
38 | 49 | public function __construct( |
|
47 | |||
48 | /** |
||
49 | * @param string $tempFolder Temporary folder where the temporary files will be created |
||
50 | * @return Reader |
||
51 | */ |
||
52 | public function setTempFolder($tempFolder) |
||
58 | |||
59 | /** |
||
60 | * Returns whether stream wrappers are supported |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | 2 | protected function doesSupportStreamWrapper() |
|
68 | |||
69 | /** |
||
70 | * Opens the file at the given file path to make it ready to be read. |
||
71 | * It also parses the sharedStrings.xml file to get all the shared strings available in memory |
||
72 | * and fetches all the available sheets. |
||
73 | * |
||
74 | * @param string $filePath Path of the file to be read |
||
75 | * @throws \Box\Spout\Common\Exception\IOException If the file at the given path or its content cannot be read |
||
76 | * @throws \Box\Spout\Reader\Exception\NoSheetsFoundException If there are no sheets in the file |
||
77 | * @return void |
||
78 | */ |
||
79 | 44 | protected function openReader($filePath) |
|
104 | |||
105 | /** |
||
106 | * Returns an iterator to iterate over sheets. |
||
107 | * |
||
108 | * @return SheetIterator To iterate over sheets |
||
109 | */ |
||
110 | 41 | protected function getConcreteSheetIterator() |
|
114 | |||
115 | /** |
||
116 | * Closes the reader. To be used after reading the file. |
||
117 | * |
||
118 | * @return void |
||
119 | */ |
||
120 | 40 | protected function closeReader() |
|
130 | } |
||
131 |