PHP Class Box\Spout\Reader\CSV\Reader

Inheritance: extends Box\Spout\Reader\AbstractReader
Afficher le fichier Open project: box/spout

Protected Properties

Свойство Type Description
$filePointer Pointer to the file to be written
$originalAutoDetectLineEndings Original value for the "auto_detect_line_endings" INI value
$sheetIterator To iterator over the CSV unique "sheet"

Méthodes publiques

Méthode Description
setEncoding ( string $encoding ) : Reader Sets the encoding of the CSV file to be read.
setEndOfLineCharacter ( string $endOfLineCharacter ) : Reader Sets the EOL for the CSV.
setFieldDelimiter ( string $fieldDelimiter ) : Reader Sets the field delimiter for the CSV.
setFieldEnclosure ( string $fieldEnclosure ) : Reader Sets the field enclosure for the CSV.

Méthodes protégées

Méthode Description
closeReader ( ) : void Closes the reader. To be used after reading the file.
doesSupportStreamWrapper ( ) : boolean Returns whether stream wrappers are supported
getConcreteSheetIterator ( ) : SheetIterator Returns an iterator to iterate over sheets.
getOptions ( ) : ReaderOptions Returns the reader's current options
openReader ( string $filePath ) : void Opens the file at the given path to make it ready to be read.

Method Details

closeReader() protected méthode

Closes the reader. To be used after reading the file.
protected closeReader ( ) : void
Résultat void

doesSupportStreamWrapper() protected méthode

Returns whether stream wrappers are supported
protected doesSupportStreamWrapper ( ) : boolean
Résultat boolean

getConcreteSheetIterator() protected méthode

Returns an iterator to iterate over sheets.
protected getConcreteSheetIterator ( ) : SheetIterator
Résultat SheetIterator To iterate over sheets

getOptions() protected méthode

Returns the reader's current options
protected getOptions ( ) : ReaderOptions
Résultat ReaderOptions

openReader() protected méthode

If setEncoding() was not called, it assumes that the file is encoded in UTF-8.
protected openReader ( string $filePath ) : void
$filePath string Path of the CSV file to be read
Résultat void

setEncoding() public méthode

Needs to be called before opening the reader.
public setEncoding ( string $encoding ) : Reader
$encoding string Encoding of the CSV file to be read
Résultat Reader

setEndOfLineCharacter() public méthode

Needs to be called before opening the reader.
public setEndOfLineCharacter ( string $endOfLineCharacter ) : Reader
$endOfLineCharacter string used to properly get lines from the CSV file.
Résultat Reader

setFieldDelimiter() public méthode

Needs to be called before opening the reader.
public setFieldDelimiter ( string $fieldDelimiter ) : Reader
$fieldDelimiter string Character that delimits fields
Résultat Reader

setFieldEnclosure() public méthode

Needs to be called before opening the reader.
public setFieldEnclosure ( string $fieldEnclosure ) : Reader
$fieldEnclosure string Character that enclose fields
Résultat Reader

Property Details

$filePointer protected_oe property

Pointer to the file to be written
protected $filePointer

$originalAutoDetectLineEndings protected_oe property

Original value for the "auto_detect_line_endings" INI value
protected $originalAutoDetectLineEndings

$sheetIterator protected_oe property

To iterator over the CSV unique "sheet"
protected $sheetIterator