Flow PHP

Definition

FinalYes

Methods

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

Methods

__construct()

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

addMetadata()

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

boolean()

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

date()

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

dateTime()

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

enum()

public static enum(string|Reference $entry, UnitEnum> $type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
$entry : string|Reference
$type : UnitEnum>
$nullable : bool = false
$metadata : Metadata|null = null
Return values
self

float()

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

fromArray()

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

integer()

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

isCompatible()

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

public isCompatible(self $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 : self
Return values
bool

isNullable()

public isNullable() : bool
Return values
bool

isSame()

public isSame(self $definition) : bool
Parameters
$definition : self
Return values
bool

json()

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

list()

public static list(string|Reference $entry, ListType<string|int, mixed> $type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
$entry : string|Reference
$type : ListType<string|int, mixed>
$nullable : bool = false
$metadata : Metadata|null = null
Return values
self

makeNullable()

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

map()

public static map(string|Reference $entry, MapType<string|int, mixed> $type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
$entry : string|Reference
$type : MapType<string|int, mixed>
$nullable : bool = false
$metadata : Metadata|null = null
Return values
self

matches()

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

merge()

public merge(self $definition) : self
Parameters
$definition : self
Return values
self

normalize()

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

nullable()

public nullable() : self

Use makeNullable() instead

Return values
self

rename()

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

string()

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

structure()

public static structure(string|Reference $entry, StructureType<string|int, array<string|int, mixed>> $type[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
$entry : string|Reference
$type : StructureType<string|int, array<string|int, mixed>>
$nullable : bool = false
$metadata : Metadata|null = null
Return values
self

time()

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

type()

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

uuid()

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

xml()

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

xml_element()

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

        
On this page

Search results