Processor
in package
FinalYes
Schema validator.
Table of Contents
Properties
- $onNewContext : array<string|int, mixed>
- $context : Context
- $skipDefaults : bool
Methods
- getWarnings() : array<string|int, string>
- process() : mixed
- Normalizes and validates data. Result is a clean completed data.
- processMultiple() : mixed
- Normalizes and validates and merges multiple data. Result is a clean completed data.
- skipDefaults() : void
- createContext() : void
- throwsErrors() : void
Properties
$onNewContext
public
array<string|int, mixed>
$onNewContext
= []
$context
private
Context
$context
$skipDefaults
private
bool
$skipDefaults
= false
Methods
getWarnings()
public
getWarnings() : array<string|int, string>
Return values
array<string|int, string>process()
Normalizes and validates data. Result is a clean completed data.
public
process(Schema $schema, mixed $data) : mixed
Parameters
- $schema : Schema
- $data : mixed
Tags
processMultiple()
Normalizes and validates and merges multiple data. Result is a clean completed data.
public
processMultiple(Schema $schema, array<string|int, mixed> $dataset) : mixed
Parameters
- $schema : Schema
- $dataset : array<string|int, mixed>
Tags
skipDefaults()
public
skipDefaults([bool $value = true ]) : void
Parameters
- $value : bool = true
createContext()
private
createContext() : void
throwsErrors()
private
throwsErrors() : void