class NormalizationBuilder

This class builds normalization conditions.

Properties

protected $node
$before
$remappings

Methods

__construct(NodeDefinition $node)

No description

$this
remap(string $key, string $plural = null)

Registers a key to remap to its plural form.

ExprBuilder|$this
before(Closure $closure = null)

Registers a closure to run before the normalization or an expression builder to build it if null is provided.

Details

__construct(NodeDefinition $node)

Parameters

NodeDefinition $node

$this remap(string $key, string $plural = null)

Registers a key to remap to its plural form.

Parameters

string $key The key to remap
string $plural The plural of the key in case of irregular plural

Return Value

$this

ExprBuilder|$this before(Closure $closure = null)

Registers a closure to run before the normalization or an expression builder to build it if null is provided.

Parameters

Closure $closure

Return Value

ExprBuilder|$this