readFilter = new DefaultReadFilter(); } public function getReadDataOnly() { return $this->readDataOnly; } public function setReadDataOnly($pValue) { $this->readDataOnly = (bool) $pValue; return $this; } public function getReadEmptyCells() { return $this->readEmptyCells; } public function setReadEmptyCells($pValue) { $this->readEmptyCells = (bool) $pValue; return $this; } public function getIncludeCharts() { return $this->includeCharts; } public function setIncludeCharts($pValue) { $this->includeCharts = (bool) $pValue; return $this; } public function getLoadSheetsOnly() { return $this->loadSheetsOnly; } public function setLoadSheetsOnly($value) { if ($value === null) { return $this->setLoadAllSheets(); } $this->loadSheetsOnly = is_array($value) ? $value : [$value]; return $this; } public function setLoadAllSheets() { $this->loadSheetsOnly = null; return $this; } public function getReadFilter() { return $this->readFilter; } public function setReadFilter(IReadFilter $pValue) { $this->readFilter = $pValue; return $this; } public function getSecurityScanner() { return $this->securityScanner; } /** * Open file for reading. * * @param string $pFilename */ protected function openFile($pFilename): void { if ($pFilename) { File::assertFile($pFilename); // Open file $fileHandle = fopen($pFilename, 'rb'); } else { $fileHandle = false; } if ($fileHandle !== false) { $this->fileHandle = $fileHandle; } else { throw new ReaderException('Could not open file ' . $pFilename . ' for reading.'); } } }