helperFactory = $helperFactory; $this->cachingStrategyFactory = $cachingStrategyFactory; } /** * @param string $filePath Path of the XLSX file being read * @param string $tempFolder Temporary folder where the temporary files to store shared strings will be stored * @param InternalEntityFactory $entityFactory Factory to create entities * * @return SharedStringsManager */ public function createSharedStringsManager($filePath, $tempFolder, $entityFactory) { $workbookRelationshipsManager = $this->createWorkbookRelationshipsManager($filePath, $entityFactory); return new SharedStringsManager( $filePath, $tempFolder, $workbookRelationshipsManager, $entityFactory, $this->helperFactory, $this->cachingStrategyFactory ); } /** * @param string $filePath Path of the XLSX file being read * @param \OpenSpout\Common\Manager\OptionsManagerInterface $optionsManager Reader's options manager * @param \OpenSpout\Reader\XLSX\Manager\SharedStringsManager $sharedStringsManager Manages shared strings * @param InternalEntityFactory $entityFactory Factory to create entities * * @return SheetManager */ public function createSheetManager($filePath, $optionsManager, $sharedStringsManager, $entityFactory) { $escaper = $this->helperFactory->createStringsEscaper(); return new SheetManager($filePath, $optionsManager, $sharedStringsManager, $escaper, $entityFactory); } /** * @param string $filePath Path of the XLSX file being read * @param InternalEntityFactory $entityFactory Factory to create entities * * @return StyleManager */ public function createStyleManager($filePath, $entityFactory) { $workbookRelationshipsManager = $this->createWorkbookRelationshipsManager($filePath, $entityFactory); return new StyleManager($filePath, $workbookRelationshipsManager, $entityFactory); } /** * @param InternalEntityFactory $entityFactory Factory to create entities * * @return RowManager */ public function createRowManager($entityFactory) { return new RowManager($entityFactory); } /** * @param string $filePath Path of the XLSX file being read * @param InternalEntityFactory $entityFactory Factory to create entities * * @return WorkbookRelationshipsManager */ private function createWorkbookRelationshipsManager($filePath, $entityFactory) { if (!isset($this->cachedWorkbookRelationshipsManager)) { $this->cachedWorkbookRelationshipsManager = new WorkbookRelationshipsManager($filePath, $entityFactory); } return $this->cachedWorkbookRelationshipsManager; } }