GoogleSheetSniffer implements Sniffer
FinalYes
Interfaces
- Sniffer
Methods
- __construct() : mixed
- bytes() : int
- close() : void
- gridRowCount() : int
- header() : array<int, string>
- names() : array<string|int, mixed>
- parts() : array<string|int, mixed>
- rows() : null|Generator<int, array<int, mixed>>
- The raw rows the sample already holds, keyed by their number in the sheet, when its range covered the whole grid - so a read does not fetch the same rows a second time. Null when it did not, and the caller must read the sheet itself.
- sample() : GoogleSheetSample
- sniff() : Sample
- The budget sized the single range when this sniffer was constructed, and sample() is memoised, so a sniff folds rows already fetched.
- units() : int
Methods
__construct()
public
__construct(GoogleSheetReader $reader, null|int<1, max> $rowBudget, TypeNarrower $typer) : mixed
Parameters
- $reader : GoogleSheetReader
- $rowBudget : null|int<1, max>
-
- null for every row
- $typer : TypeNarrower
bytes()
public
bytes(int $unit) : int
Parameters
- $unit : int
Return values
intclose()
public
close() : void
gridRowCount()
public
gridRowCount() : int
Return values
intheader()
public
header() : array<int, string>
Return values
array<int, string>names()
public
names() : array<string|int, mixed>
Return values
array<string|int, mixed>parts()
public
parts(int $unit, int $targetBytes) : array<string|int, mixed>
Parameters
- $unit : int
- $targetBytes : int
Return values
array<string|int, mixed>rows()
The raw rows the sample already holds, keyed by their number in the sheet, when its range covered the whole grid - so a read does not fetch the same rows a second time. Null when it did not, and the caller must read the sheet itself.
public
rows() : null|Generator<int, array<int, mixed>>
Return values
null|Generator<int, array<int, mixed>>sample()
public
sample() : GoogleSheetSample
Return values
GoogleSheetSamplesniff()
The budget sized the single range when this sniffer was constructed, and sample() is memoised, so a sniff folds rows already fetched.
public
sniff(int $unit, int|null $rowBudget) : Sample
Parameters
- $unit : int
- $rowBudget : int|null
Return values
Sampleunits()
public
units() : int