Flow PHP

CSVFileReader implements SchemaSampler

Read onlyYes
FinalYes

Interfaces

SchemaSampler

Methods

__construct()  : mixed
batches()  : Generator<int, array<int, RawRowValues>>
Abandoning the generator closes the source.
columns()  : array<int, string>
header()  : CSVHeader
sample()  : Generator<int, RawRowValues>
samples()  : Generator<int, Generator<int, RawRowValues>>
$rowBudget is deliberately unused: sample() is lazy and SchemaInferrer stops advancing it.

Methods

__construct()

public __construct(CSVSourceOpener $opener, array<int, SourceFile$sources) : mixed
Parameters
$opener : CSVSourceOpener
$sources : array<int, SourceFile>

materialised, not a Generator: header() and samples() both walk it

batches()

Abandoning the generator closes the source.

public batches(SourceFile $source, int<1, max> $batchSize) : Generator<int, array<int, RawRowValues>>
Parameters
$source : SourceFile
$batchSize : int<1, max>
Return values
Generator<int, array<int, RawRowValues>>

columns()

public columns(SourceFile $source) : array<int, string>
Parameters
$source : SourceFile
Return values
array<int, string>

sample()

public sample(SourceFile $source) : Generator<int, RawRowValues>
Parameters
$source : SourceFile
Return values
Generator<int, RawRowValues>

samples()

$rowBudget is deliberately unused: sample() is lazy and SchemaInferrer stops advancing it.

public samples(int $rowBudget) : Generator<int, Generator<int, RawRowValues>>
Parameters
$rowBudget : int
Return values
Generator<int, Generator<int, RawRowValues>>
On this page

Search results