Flow PHP

Definition

Tags
template-covariant

Methods

addMetadata()  : static
entry()  : Reference
isCompatible()  : bool
Checks if another type is compatible with this type. Nullability is validated from a schema evolution perspective.
isNullable()  : bool
isSame()  : bool
makeNullable()  : static
matches()  : bool
merge()  : Definition<string|int, mixed>
metadata()  : Metadata
normalize()  : array<string, mixed>
nullable()  : static
rename()  : static
setMetadata()  : static
type()  : Type<string|int, T>

Methods

addMetadata()

public addMetadata(string $key, array<string|int, mixed> $value) : static
Parameters
$key : string
$value : array<string|int, mixed>
Return values
static

isCompatible()

Checks if another type is compatible with this type. Nullability is validated from a schema evolution perspective.

public isCompatible(Definition<string|int, mixed> $definition) : bool

This means that when current type is nullable and the other type is not nullable, it is still compatible. When given type is not nullable and current type is nullable, it is not compatible.

Parameters
$definition : Definition<string|int, mixed>
Return values
bool

isNullable()

public isNullable() : bool
Return values
bool

makeNullable()

public makeNullable([bool $nullable = true ]) : static
Parameters
$nullable : bool = true
Return values
static

matches()

public matches(Entry<string|int, mixed> $entry) : bool
Parameters
$entry : Entry<string|int, mixed>
Return values
bool

normalize()

public normalize() : array<string, mixed>
Return values
array<string, mixed>

nullable()

public nullable() : static

Use makeNullable() instead

Return values
static

rename()

public rename(string $newName) : static
Parameters
$newName : string
Return values
static

type()

public type() : Type<string|int, T>
Return values
Type<string|int, T>

        
On this page

Search results