NormalizationBuilder
in package
This class builds normalization conditions.
Tags
Table of Contents
Properties
- $before : array<string|int, ExprBuilder<string|int, T>|Closure>
- $declaredTypes : array<string|int, mixed>
- $remappings : array<string|int, mixed>
- $node : NodeDefinition
Methods
- __construct() : mixed
- before() : T>)
- Registers a closure to run before the normalization or an expression builder to build it if null is provided.
- remap() : $this
- Registers a key to remap to its plural form.
Properties
$before
public
array<string|int, ExprBuilder<string|int, T>|Closure>
$before
= []
$declaredTypes
public
array<string|int, mixed>
$declaredTypes
= []
$remappings
public
array<string|int, mixed>
$remappings
= []
$node
protected
NodeDefinition
$node
Methods
__construct()
public
__construct(T $node) : mixed
Parameters
- $node : T
before()
Registers a closure to run before the normalization or an expression builder to build it if null is provided.
public
before([Closure|null $closure = null ]) : T>)
Parameters
- $closure : Closure|null = null
Return values
T>)remap()
Registers a key to remap to its plural form.
public
remap(string $key[, string|null $plural = null ]) : $this
Parameters
- $key : string
-
The key to remap
- $plural : string|null = null
-
The plural of the key in case of irregular plural