Flow PHP

WorkbookSampler implements SchemaSampler

FinalYes

Interfaces

SchemaSampler

Methods

__construct()  : mixed
close()  : void
header()  : ExcelHeader
samples()  : Generator<int, Generator<int, RawRowValues>>
A bounded sample keeps what it parsed for take(); an unbounded one parses every row, so it streams and closes as it goes. Either way SchemaInferrer stops advancing a sheet once its budget is spent.
take()  : WorkbookSheet|null
The sheet this sampler read $file through, handed over to the caller to read on and close; null when the sample never reached the file.

Methods

__construct()

public __construct(WorkbookReader $workbook, array<int, SourceFile$files) : mixed
Parameters
$workbook : WorkbookReader
$files : array<int, SourceFile>

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

samples()

A bounded sample keeps what it parsed for take(); an unbounded one parses every row, so it streams and closes as it goes. Either way SchemaInferrer stops advancing a sheet once its budget is spent.

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

take()

The sheet this sampler read $file through, handed over to the caller to read on and close; null when the sample never reached the file.

public take(SourceFile $file) : WorkbookSheet|null
Parameters
$file : SourceFile
Return values
WorkbookSheet|null
On this page

Search results