Flow PHP

Definition

FinalYes
Tags
template-covariant

Methods

__construct()  : mixed
addMetadata()  : Definition<string|int, T>
boolean()  : Definition<string|int, bool>
date()  : Definition<string|int, DateTimeInterface>
dateTime()  : Definition<string|int, DateTimeInterface>
entry()  : Reference
enum()  : Definition<string|int, TEnum>
float()  : Definition<string|int, float>
fromArray()  : Definition<string|int, mixed>
integer()  : Definition<string|int, int>
isCompatible()  : bool
Checks if another type is compatible with this type. Nullability is validated from a schema evolution perspective.
isNullable()  : bool
isSame()  : bool
json()  : Definition<string|int, string>
list()  : Definition<string|int, array<int, TElement>>
makeNullable()  : Definition<string|int, T>
map()  : self
matches()  : bool
merge()  : Definition<string|int, mixed>
metadata()  : Metadata
normalize()  : array<string, mixed>
nullable()  : Definition<string|int, T>
rename()  : Definition<string|int, T>
setMetadata()  : Definition<string|int, T>
string()  : Definition<string|int, string>
structure()  : Definition<string|int, TElement>
time()  : Definition<string|int, DateInterval>
type()  : Type<string|int, T>
uuid()  : Definition<string|int, Uuid>
xml()  : Definition<string|int, DOMDocument>
xml_element()  : Definition<string|int, DOMElement>

Methods

__construct()

public __construct(string|Reference $ref, Type<string|int, T$type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : mixed
Parameters
$ref : string|Reference
$type : Type<string|int, T>
$nullable : bool = false
$metadata : Metadata|null = null

addMetadata()

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

dateTime()

public static dateTime(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : Definition<string|int, DateTimeInterface>
Parameters
$entry : string|Reference
$nullable : bool = false
$metadata : Metadata|null = null
Return values
Definition<string|int, DateTimeInterface>

enum()

public static enum(string|Reference $entry, TEnum> $type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : Definition<string|int, TEnum>
Parameters
$entry : string|Reference
$type : TEnum>
$nullable : bool = false
$metadata : Metadata|null = null
Tags
template
Return values
Definition<string|int, TEnum>

fromArray()

public static fromArray(array<string|int, mixed> $definition) : Definition<string|int, mixed>
Parameters
$definition : array<string|int, mixed>
Return values
Definition<string|int, mixed>

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

isSame()

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

list()

public static list(string|Reference $entry, Type<string|int, array<int, TElement>> $type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : Definition<string|int, array<int, TElement>>
Parameters
$entry : string|Reference
$type : Type<string|int, array<int, TElement>>
$nullable : bool = false
$metadata : Metadata|null = null
Tags
template
Return values
Definition<string|int, array<int, TElement>>

makeNullable()

public makeNullable([bool $nullable = true ]) : Definition<string|int, T>
Parameters
$nullable : bool = true
Return values
Definition<string|int, T>

map()

public static map(string|Reference $entry, Type $type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
$entry : string|Reference
$type : Type
$nullable : bool = false
$metadata : Metadata|null = null
Tags
template
template
Return values
self

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>

structure()

public static structure(string|Reference $entry, Type<string|int, TElement$type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : Definition<string|int, TElement>
Parameters
$entry : string|Reference
$type : Type<string|int, TElement>
$nullable : bool = false
$metadata : Metadata|null = null
Tags
template
Return values
Definition<string|int, TElement>

type()

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

        
On this page

Search results