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
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
selfboolean()
public
static boolean(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selfdate()
public
static date(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selfdateTime()
public
static dateTime(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selfentry()
public
entry() : Reference
Return values
Referenceenum()
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
selffloat()
public
static float(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selffromArray()
public
static fromArray(array<string|int, mixed> $definition) : self
Parameters
- $definition : array<string|int, mixed>
Return values
selfinteger()
public
static integer(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selfisCompatible()
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
boolisNullable()
public
isNullable() : bool
Return values
boolisSame()
public
isSame(self $definition) : bool
Parameters
- $definition : self
Return values
booljson()
public
static json(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selflist()
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
selfmakeNullable()
public
makeNullable([bool $nullable = true ]) : self
Parameters
- $nullable : bool = true
Return values
selfmap()
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
selfmatches()
public
matches(Entry<mixed, mixed> $entry) : bool
Parameters
- $entry : Entry<mixed, mixed>
Return values
boolmerge()
public
merge(self $definition) : self
Parameters
- $definition : self
Return values
selfmetadata()
public
metadata() : Metadata
Return values
Metadatanormalize()
public
normalize() : array<string|int, mixed>
Return values
array<string|int, mixed>nullable()
public
nullable() : self
Use makeNullable() instead
Return values
selfrename()
public
rename(string $newName) : self
Parameters
- $newName : string
Return values
selfsetMetadata()
public
setMetadata(Metadata $metadata) : self
Parameters
- $metadata : Metadata
Return values
selfstring()
public
static string(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selfstructure()
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
selftime()
public
static time(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selftype()
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
Return values
selfxml()
public
static xml(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self
Parameters
Return values
selfxml_element()
public
static xml_element(string|Reference $entry[, bool $nullable = false ][, Metadata|null $metadata = null ]) : self