Flow PHP

SniffedColumns

Read onlyYes
FinalYes

One unit's fold, done: the column types in first-seen order and the rows they were observed over.

Properties

$rows  : int
$types  : array<string|int, mixed>

Methods

__construct()  : mixed
fromArray()  : self
merge()  : self
Merge left-to-right in listing order: name order follows first-seen, so a different bracketing of the name sequence changes the definition order (never the types).
normalize()  : array{columns: list}>, rows: int}
A numeric column name is an int key here and a string in the JSON: the name travels as a string either way.
schema()  : Schema

Properties

Methods

__construct()

public __construct(array<string|int, Type<string|int, mixed>> $types, int<0, max> $rows[, TypeWidener $widener = new TypeWidener() ]) : mixed
Parameters
$types : array<string|int, Type<string|int, mixed>>

first-seen order: header names first, then names met only in rows

$rows : int<0, max>
$widener : TypeWidener = new TypeWidener()

fromArray()

public static fromArray(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>

the shape of normalize()

Return values
self

merge()

Merge left-to-right in listing order: name order follows first-seen, so a different bracketing of the name sequence changes the definition order (never the types).

public merge(self $other, bool $unionByName) : self
Parameters
$other : self
$unionByName : bool
Return values
self

normalize()

A numeric column name is an int key here and a string in the JSON: the name travels as a string either way.

public normalize() : array{columns: list}>, rows: int}
Return values
array{columns: list}>, rows: int}
On this page

Search results