Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
OpenSpout\Reader\AbstractReader Class Reference
Inheritance diagram for OpenSpout\Reader\AbstractReader:
OpenSpout\Reader\ReaderInterface OpenSpout\Reader\CSV\Reader OpenSpout\Reader\ODS\Reader OpenSpout\Reader\XLSX\Reader

Public Member Functions

 close ()
 Closes the reader, preventing any additional reading.
 
 getSheetIterator ()
 Returns an iterator to iterate over sheets.
 
 open (string $filePath)
 Prepares the reader to read the given file.
 

Protected Member Functions

 closeReader ()
 Closes the reader.
 
 doesSupportStreamWrapper ()
 Returns whether stream wrappers are supported.
 
 ensureStreamOpened ()
 
 openReader (string $filePath)
 Opens the file at the given file path to make it ready to be read.
 

Member Function Documentation

◆ close()

OpenSpout\Reader\AbstractReader::close ( )
final

Closes the reader, preventing any additional reading.

Implements OpenSpout\Reader\ReaderInterface.

◆ closeReader()

OpenSpout\Reader\AbstractReader::closeReader ( )
abstractprotected

Closes the reader.

To be used after reading the file.

Reimplemented in OpenSpout\Reader\CSV\Reader, OpenSpout\Reader\ODS\Reader, and OpenSpout\Reader\XLSX\Reader.

◆ doesSupportStreamWrapper()

OpenSpout\Reader\AbstractReader::doesSupportStreamWrapper ( )
abstractprotected

Returns whether stream wrappers are supported.

Reimplemented in OpenSpout\Reader\CSV\Reader, OpenSpout\Reader\ODS\Reader, and OpenSpout\Reader\XLSX\Reader.

◆ getSheetIterator()

OpenSpout\Reader\ReaderInterface::getSheetIterator ( )
inherited

Returns an iterator to iterate over sheets.

Return values
T
Exceptions
OpenSpout\Reader\Exception\ReaderNotOpenedExceptionIf called before opening the reader

Implemented in OpenSpout\Reader\CSV\Reader, OpenSpout\Reader\ODS\Reader, and OpenSpout\Reader\XLSX\Reader.

◆ open()

OpenSpout\Reader\AbstractReader::open ( string $filePath)

Prepares the reader to read the given file.

It also makes sure that the file exists and is readable.

Parameters
string$filePathPath of the file to be read
Exceptions
OpenSpout\Common\Exception\IOExceptionIf the file at the given path does not exist, is not readable or is corrupted

Implements OpenSpout\Reader\ReaderInterface.

◆ openReader()

OpenSpout\Reader\AbstractReader::openReader ( string $filePath)
abstractprotected

Opens the file at the given file path to make it ready to be read.

Parameters
string$filePathPath of the file to be read

Reimplemented in OpenSpout\Reader\CSV\Reader, OpenSpout\Reader\ODS\Reader, and OpenSpout\Reader\XLSX\Reader.


The documentation for this class was generated from the following file: