XMLDefinition implements Definition
FinalYes
Tags
Interfaces
Methods
- __construct() : mixed
- 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
__construct()
public
__construct(string|Reference $ref[, bool $nullable = false ][, Metadata|null $metadata = null ]) : mixed
Parameters
addMetadata()
public
addMetadata(string $key, array<string|int, mixed> $value) : static
Parameters
- $key : string
- $value : array<string|int, mixed>
Return values
staticentry()
public
entry() : Reference
Return values
ReferenceisCompatible()
Checks if another type is compatible with this type. Nullability is validated from a schema evolution perspective.
public
isCompatible(Definition $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
Return values
boolisNullable()
public
isNullable() : bool
Return values
boolisSame()
public
isSame(Definition $definition) : bool
Parameters
- $definition : Definition
Return values
boolmakeNullable()
public
makeNullable([bool $nullable = true ]) : static
Parameters
- $nullable : bool = true
Return values
staticmatches()
public
matches(Entry $entry) : bool
Parameters
- $entry : Entry
Return values
boolmerge()
public
merge(Definition $definition) : Definition<string|int, mixed>
Parameters
- $definition : Definition
Return values
Definition<string|int, mixed>metadata()
public
metadata() : Metadata
Return values
Metadatanormalize()
public
normalize() : array<string, mixed>
Return values
array<string, mixed>nullable()
public
nullable() : static
Return values
staticrename()
public
rename(string $newName) : static
Parameters
- $newName : string
Return values
staticsetMetadata()
public
setMetadata(Metadata $metadata) : static
Parameters
- $metadata : Metadata
Return values
statictype()
public
type() : Type<string|int, T>