Documentation

Structure
in package
implements Schema uses Base

FinalYes

Table of Contents

Interfaces

Schema

Properties

$items  : array<string|int, Schema>
$otherItems  : Schema|null
for array|list
$range  : array{?int, ?int}
$skipDefaults  : bool

Methods

__construct()  : mixed
complete()  : mixed
Validation and finalization.
completeDefault()  : mixed
default()  : self
extend()  : self
getShape()  : array<string|int, mixed>
max()  : self
merge()  : mixed
Merging.
min()  : self
normalize()  : mixed
Normalization.
otherItems()  : self
skipDefaults()  : self
validateItems()  : void

Properties

$range

private array{?int, ?int} $range = [null, null]

$skipDefaults

private bool $skipDefaults = false

Methods

__construct()

public __construct(array<string|int, Schema$shape) : mixed
Parameters
$shape : array<string|int, Schema>

complete()

Validation and finalization.

public complete(mixed $value, Context $context) : mixed
Parameters
$value : mixed
$context : Context

default()

public default(mixed $value) : self
Parameters
$value : mixed
Return values
self

extend()

public extend(array<string|int, mixed>|self $shape) : self
Parameters
$shape : array<string|int, mixed>|self
Return values
self

getShape()

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

max()

public max(int|null $max) : self
Parameters
$max : int|null
Return values
self

merge()

Merging.

public merge(mixed $value, mixed $base) : mixed
Parameters
$value : mixed
$base : mixed

min()

public min(int|null $min) : self
Parameters
$min : int|null
Return values
self

normalize()

Normalization.

public normalize(mixed $value, Context $context) : mixed
Parameters
$value : mixed
$context : Context

otherItems()

public otherItems([string|Schema $type = 'mixed' ]) : self
Parameters
$type : string|Schema = 'mixed'
Return values
self

skipDefaults()

public skipDefaults([bool $state = true ]) : self
Parameters
$state : bool = true
Return values
self

validateItems()

private validateItems(array<string|int, mixed> &$value, Context $context) : void
Parameters
$value : array<string|int, mixed>
$context : Context

        
On this page

Search results