Flow PHP

InferredColumns

Read onlyYes
FinalYes

Methods

__construct()  : mixed
fromArray()  : self
normalize()  : array{inferred: array, tail: list, inference: array, inferred_from: string}
refuseDivergence()  : void

Methods

__construct()

public __construct(Schema $inferred, array<int, string> $tail, SchemaInference $inference, string $inferredFrom) : mixed
Parameters
$inferred : Schema

the inferred body, file constant columns excluded

$tail : array<int, string>

the file constant columns, never part of a file's own columns

$inference : SchemaInference
$inferredFrom : string

the source the inferred header was read from

fromArray()

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

the shape of normalize()

Return values
self

normalize()

public normalize() : array{inferred: array, tail: list, inference: array, inferred_from: string}
Return values
array{inferred: array, tail: list, inference: array, inferred_from: string}

refuseDivergence()

public refuseDivergence(string $source, array<int, string> $columns) : void
Parameters
$source : string
$columns : array<int, string>

the file's columns, constant columns and duplicates allowed

Tags
throws
InferredSchemaException
On this page

Search results