PHP Class Box\Spout\Reader\CSV\Reader

Inheritance: extends Box\Spout\Reader\AbstractReader
ファイルを表示 Open project: box/spout

Protected Properties

Property 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"

Public Methods

Method 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.

Protected Methods

Method 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 method

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

doesSupportStreamWrapper() protected method

Returns whether stream wrappers are supported
protected doesSupportStreamWrapper ( ) : boolean
return boolean

getConcreteSheetIterator() protected method

Returns an iterator to iterate over sheets.
protected getConcreteSheetIterator ( ) : SheetIterator
return SheetIterator To iterate over sheets

getOptions() protected method

Returns the reader's current options
protected getOptions ( ) : ReaderOptions
return ReaderOptions

openReader() protected method

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
return void

setEncoding() public method

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

setEndOfLineCharacter() public method

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

setFieldDelimiter() public method

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

setFieldEnclosure() public method

Needs to be called before opening the reader.
public setFieldEnclosure ( string $fieldEnclosure ) : Reader
$fieldEnclosure string Character that enclose fields
return 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