Flow PHP

CSVSniffer implements Describable, Sniffer

FinalYes

Interfaces

Describable
Sniffer

Methods

__construct()  : mixed
bytes()  : int
close()  : void
describe()  : Description|null
fromDescription()  : static
header()  : GridHeader
The first non-empty header among the sources, memoised; a unit sniffer inherits the parent's.
names()  : array<string|int, mixed>
parts()  : array<string|int, mixed>
Byte windows of the source when it is larger than $targetBytes, each resynced to a record start by the opener; a source of unknown size, or one that fits, is one part.
sniff()  : Sample
units()  : int

Methods

__construct()

public __construct(CSVSourceOpener $opener, array<int, SourceFile> $sources, InferredTypes $candidates[, null|GridHeader $header = null ][, null|FileSplit $window = null ]) : mixed
Parameters
$opener : CSVSourceOpener
$sources : array<int, SourceFile>

materialised, not a Generator: header() and sniff() both index it

$candidates : InferredTypes
$header : null|GridHeader = null

the header already resolved by the parent sniffer; a one-unit sniffer never looks for it again

$window : null|FileSplit = null

the byte window of its only source a part sniffs; null sniffs the sources whole

bytes()

public bytes(int $unit) : int
Parameters
$unit : int
Return values
int

describe()

public describe() : Description|null
Return values
Description|null

fromDescription()

public static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
$data : array<string|int, mixed>
$rebuild : Rebuild
Return values
static

header()

The first non-empty header among the sources, memoised; a unit sniffer inherits the parent's.

public header() : GridHeader
Return values
GridHeader

names()

public names() : array<string|int, mixed>
Return values
array<string|int, mixed>

parts()

Byte windows of the source when it is larger than $targetBytes, each resynced to a record start by the opener; 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
Sample
On this page

Search results