Type
in package
implements
Schema
uses
Base
FinalYes
Table of Contents
Interfaces
Properties
- $itemsKey : Schema|null
- $itemsValue : Schema|null
- $merge : bool
- $pattern : string|null
- $range : array{?float, ?float}
- $type : string
Methods
- __construct() : mixed
- complete() : mixed
- Validation and finalization.
- dynamic() : self
- max() : self
- merge() : mixed
- Merging.
- mergeDefaults() : self
- min() : self
- normalize() : mixed
- Normalization.
- nullable() : self
- pattern() : self
- validateItems() : void
Properties
$itemsKey
private
Schema|null
$itemsKey
= null
$itemsValue
private
Schema|null
$itemsValue
= null
$merge
private
bool
$merge
= true
$pattern
private
string|null
$pattern
= null
$range
private
array{?float, ?float}
$range
= [null, null]
$type
private
string
$type
Methods
__construct()
public
__construct(string $type) : mixed
Parameters
- $type : string
complete()
Validation and finalization.
public
complete(mixed $value, Context $context) : mixed
Parameters
- $value : mixed
- $context : Context
dynamic()
public
dynamic() : self
Return values
selfmax()
public
max(float|null $max) : self
Parameters
- $max : float|null
Return values
selfmerge()
Merging.
public
merge(mixed $value, mixed $base) : mixed
Parameters
- $value : mixed
- $base : mixed
mergeDefaults()
public
mergeDefaults([bool $state = true ]) : self
Parameters
- $state : bool = true
Return values
selfmin()
public
min(float|null $min) : self
Parameters
- $min : float|null
Return values
selfnormalize()
Normalization.
public
normalize(mixed $value, Context $context) : mixed
Parameters
- $value : mixed
- $context : Context
nullable()
public
nullable() : self
Return values
selfpattern()
public
pattern(string|null $pattern) : self
Parameters
- $pattern : string|null
Return values
selfvalidateItems()
private
validateItems(array<string|int, mixed> &$value, Context $context) : void
Parameters
- $value : array<string|int, mixed>
- $context : Context