Flow PHP

InferredTypes

Read onlyYes
FinalYes

Methods

__construct()  : mixed
allows()  : bool
default()  : self
Every rung but html and xml: no engine infers markup, HTMLType::cast() throws below PHP 8.4, and isXML() builds a DOMDocument per cell.
fromArray()  : self
normalize()  : array<int, array<string, mixed>>
toArray()  : array<int, Type<string|int, mixed>>

Methods

__construct()

public __construct(Type<string|int, mixed> ...$types) : mixed
Parameters
$types : Type<string|int, mixed>

allows()

public allows(Type<string|int, mixed> $type) : bool
Parameters
$type : Type<string|int, mixed>
Return values
bool

default()

Every rung but html and xml: no engine infers markup, HTMLType::cast() throws below PHP 8.4, and isXML() builds a DOMDocument per cell.

public static default() : self

type_enum(UnitEnum::class) is the family marker, not a rung: no text source ever climbs to an enum, but a value-typed source reads one straight off the value (InstanceOfTypeNarrower), and without the entry TypeFloor would floor it to string - which StringType::cast() then refuses, making an enum column unreadable. An explicit ->types(...) set that omits it still floors enums, which is what allStrings() is.

Return values
self

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<int, array<string, mixed>>
Return values
array<int, array<string, mixed>> —

every candidate as Type::normalize(), in order

toArray()

public toArray() : array<int, Type<string|int, mixed>>
Return values
array<int, Type<string|int, mixed>>
On this page

Search results