PHP Class Box\Spout\Reader\CSV\ReaderOptions

Inheritance: extends Box\Spout\Reader\Common\ReaderOptions
Show file Open project: box/spout Class Usage Examples

Protected Properties

Property Type Description
$encoding Encoding of the CSV file to be read
$endOfLineCharacter Defines the End of line
$fieldDelimiter Defines the character used to delimit fields (one character only)
$fieldEnclosure Defines the character used to enclose fields (one character only)

Public Methods

Method Description
getEncoding ( ) : string
getEndOfLineCharacter ( ) : string
getFieldDelimiter ( ) : string
getFieldEnclosure ( ) : string
setEncoding ( string $encoding ) : ReaderOptions Sets the encoding of the CSV file to be read.
setEndOfLineCharacter ( string $endOfLineCharacter ) : ReaderOptions Sets the EOL for the CSV.
setFieldDelimiter ( string $fieldDelimiter ) : ReaderOptions Sets the field delimiter for the CSV.
setFieldEnclosure ( string $fieldEnclosure ) : ReaderOptions Sets the field enclosure for the CSV.

Method Details

getEncoding() public method

public getEncoding ( ) : string
return string

getEndOfLineCharacter() public method

public getEndOfLineCharacter ( ) : string
return string EOL for the CSV

getFieldDelimiter() public method

public getFieldDelimiter ( ) : string
return string

getFieldEnclosure() public method

public getFieldEnclosure ( ) : string
return string

setEncoding() public method

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

setEndOfLineCharacter() public method

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

setFieldDelimiter() public method

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

setFieldEnclosure() public method

Needs to be called before opening the reader.
public setFieldEnclosure ( string $fieldEnclosure ) : ReaderOptions
$fieldEnclosure string Character that enclose fields
return ReaderOptions

Property Details

$encoding protected property

Encoding of the CSV file to be read
protected $encoding

$endOfLineCharacter protected property

Defines the End of line
protected $endOfLineCharacter

$fieldDelimiter protected property

Defines the character used to delimit fields (one character only)
protected $fieldDelimiter

$fieldEnclosure protected property

Defines the character used to enclose fields (one character only)
protected $fieldEnclosure