Flow PHP

CSVLineReader

FinalYes

Methods

__construct()  : mixed
lastRecordBytes()  : int<0, max>
The bytes the record readLines() yielded last took in the stream, line endings and BOM included.
readLines()  : Generator<int, string>

Methods

__construct()

public __construct(string $enclosure[, string $separator = ',' ][, string $escape = '\\' ][, null|int<1, max> $charactersReadInLine = null ][, bool $removeBOM = true ]) : mixed
Parameters
$enclosure : string
$separator : string = ','
$escape : string = '\\'
$charactersReadInLine : null|int<1, max> = null
$removeBOM : bool = true

lastRecordBytes()

The bytes the record readLines() yielded last took in the stream, line endings and BOM included.

public lastRecordBytes() : int<0, max>

SourceStream::readLines() cannot tell whether the last line ended with "\n", so a last record without one is counted one byte too long.

Return values
int<0, max>

readLines()

public readLines(SourceStream $stream) : Generator<int, string>
Parameters
$stream : SourceStream
Return values
Generator<int, string>
On this page

Search results