Flow PHP

Type

Tags
template-covariant

of mixed

Methods

fromArray()  : Type<string|int, T>
isComparableWith()  : bool
isCompatible()  : bool
Checks if another type is compatible with this type. Nullability is validated from a schema evolution perspective.
isEqual()  : bool
Checks if another type is equal to this type. Nullability is not considered in this comparison.
isSame()  : bool
Checks if another type is the same as this type, including nullability.
isValid()  : bool
makeNullable()  : Type<string|int, T>
merge()  : Type<string|int, mixed>
normalize()  : array<string|int, mixed>
nullable()  : bool
toString()  : string

Methods

fromArray()

public static fromArray(array<string|int, mixed> $data) : Type<string|int, T>
Parameters
$data : array<string|int, mixed>
Return values
Type<string|int, T>

isComparableWith()

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

isCompatible()

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

public isCompatible(Type<string|int, mixed> $type) : bool

This means that when current type is nullable and ther 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
$type : Type<string|int, mixed>
Return values
bool

isEqual()

Checks if another type is equal to this type. Nullability is not considered in this comparison.

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

isSame()

Checks if another type is the same as this type, including nullability.

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

isValid()

public isValid(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

makeNullable()

public makeNullable(bool $nullable) : Type<string|int, T>
Parameters
$nullable : bool
Return values
Type<string|int, T>

merge()

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

normalize()

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

nullable()

public nullable() : bool
Return values
bool

toString()

public toString() : string
Return values
string

        
On this page

Search results