Flow PHP

Row

Read onlyYes
FinalYes

Methods

__construct()  : mixed
conformTo()  : self
matchTo() without its value check: the order, padding, missing, unknown and null rules all hold, but a non-null value is not validated against its type - the caller produced it by casting to, or decoding from, that type.
get()  : null|array<string|int, mixed>|bool|float|int|object|string
has()  : bool
hash()  : string
matchTo()  : self
Rewrites the storage to satisfy $schema: columns take the Schema's order and a declared nullable column the row omits is padded with null. The row does not know its position in a batch - Rows places the violation with SchemaMismatchException.
names()  : array<int, string>
project()  : self
Drops the columns $schema does not declare and carries its order into the row. Unlike matchTo() it validates nothing - the caller is changing the shape, not checking it.
toArray()  : array<string|int, mixed>
values()  : array<string|int, mixed>

Methods

__construct()

public __construct(array<string|int, mixed> $values) : mixed
Parameters
$values : array<string|int, mixed>

storage keyed by name; the Schema defines column order (Rows::schema()->references())

conformTo()

matchTo() without its value check: the order, padding, missing, unknown and null rules all hold, but a non-null value is not validated against its type - the caller produced it by casting to, or decoding from, that type.

public conformTo(Schema $schema) : self
Parameters
$schema : Schema
Tags
throws
ColumnMismatchException
Return values
self

get()

public get(string|Reference $reference) : null|array<string|int, mixed>|bool|float|int|object|string
Parameters
$reference : string|Reference
Tags
throws
InvalidArgumentException
Return values
null|array<string|int, mixed>|bool|float|int|object|string

has()

public has(string|Reference ...$references) : bool
Parameters
$references : string|Reference
Return values
bool

matchTo()

Rewrites the storage to satisfy $schema: columns take the Schema's order and a declared nullable column the row omits is padded with null. The row does not know its position in a batch - Rows places the violation with SchemaMismatchException.

public matchTo(Schema $schema) : self
Parameters
$schema : Schema
Tags
throws
ColumnMismatchException
Return values
self

names()

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

project()

Drops the columns $schema does not declare and carries its order into the row. Unlike matchTo() it validates nothing - the caller is changing the shape, not checking it.

public project(Schema $schema) : self
Parameters
$schema : Schema
Return values
self

toArray()

public toArray([bool $withKeys = true ]) : array<string|int, mixed>
Parameters
$withKeys : bool = true
Return values
array<string|int, mixed>

values()

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

Search results