JsonSniffer implements Describable, Sniffer
Read onlyYes
FinalYes
Interfaces
- Describable
- Sniffer
Methods
- __construct() : mixed
- bytes() : int
- close() : void
- describe() : Description|null
- fromDescription() : static
- names() : array<string|int, mixed>
- parts() : array<string|int, mixed>
- Byte windows of a JSON lines source larger than $targetBytes, each resynced to a line start by the reader; a document, a source of unknown size or one that fits is one part.
- sniff() : Sample
- units() : int
Methods
__construct()
public
__construct(JsonFileReader $reader, array<int, SourceFile> $sources[, null|FileSplit $window = null ]) : mixed
Parameters
- $reader : JsonFileReader
- $sources : array<int, SourceFile>
-
the extractor's materialised listing, already filtered, so filesToSniff counts only files the read would open
- $window : null|FileSplit = null
-
the byte window of its only source a part sniffs, Lines only; null sniffs the sources whole
bytes()
public
bytes(int $unit) : int
Parameters
- $unit : int
Return values
intclose()
public
close() : void
describe()
public
describe() : Description|null
Return values
Description|nullfromDescription()
public
static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
- $data : array<string|int, mixed>
- $rebuild : Rebuild
Return values
staticnames()
public
names() : array<string|int, mixed>
Return values
array<string|int, mixed>parts()
Byte windows of a JSON lines source larger than $targetBytes, each resynced to a line start by the reader; a document, a source of unknown size or one that fits is one part.
public
parts(int $unit, int $targetBytes) : array<string|int, mixed>
Parameters
- $unit : int
- $targetBytes : int
Return values
array<string|int, mixed>sniff()
public
sniff(int $unit, int|null $rowBudget) : Sample
Parameters
- $unit : int
- $rowBudget : int|null
Return values
Sampleunits()
public
units() : int