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

Public Member Functions

 __construct (?Options $options=null, ?EncodingHelper $encodingHelper=null)
 
 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 path to make it ready to be read.
 

Member Function Documentation

◆ close()

OpenSpout\Reader\AbstractReader::close ( )
finalinherited

Closes the reader, preventing any additional reading.

Implements OpenSpout\Reader\ReaderInterface.

◆ closeReader()

OpenSpout\Reader\CSV\Reader::closeReader ( )
protected

Closes the reader.

To be used after reading the file.

Reimplemented from OpenSpout\Reader\AbstractReader.

◆ doesSupportStreamWrapper()

OpenSpout\Reader\CSV\Reader::doesSupportStreamWrapper ( )
protected

Returns whether stream wrappers are supported.

Reimplemented from OpenSpout\Reader\AbstractReader.

◆ getSheetIterator()

OpenSpout\Reader\CSV\Reader::getSheetIterator ( )

Returns an iterator to iterate over sheets.

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

Implements OpenSpout\Reader\ReaderInterface.

◆ open()

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

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\CSV\Reader::openReader ( string $filePath)
protected

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

If setEncoding() was not called, it assumes that the file is encoded in UTF-8.

Parameters
string$filePathPath of the CSV file to be read
Exceptions
OpenSpout\Common\Exception\IOException

Reimplemented from OpenSpout\Reader\AbstractReader.


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