ValidatorNode
Format-independent description of a single
This is the intermediate representation shared by every front-end (currently only the XML parser) and every back-end (the runtime cache emitter, the fluent-source emitter). Its shape is a snapshot of what ValidatorConfigHandler used to compute and immediately discard while emitting PHP text directly from the DOM walk.
Synopsis
Section titled “Synopsis”final class ValidatorNode
| Since | 1.0.0 |
| Source | Validator/Compiler/Ir/ValidatorNode.php |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
$arguments | array | readonly. |
$base | string | readonly. |
$children | array | readonly. |
$declaredNames | array | readonly. |
$errors | array | readonly. |
$methods | array | readonly. |
$name | string | readonly. |
$parameters | array | readonly. |
$validatorClass | string | readonly. |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(string $name, string $validatorClass, array<int|string, mixed> $arguments, string $base, array<string, mixed> $parameters, array<int|string, mixed> $errors, array<string> $methods, array<string> $declaredNames, array<ValidatorNode> $children = []): mixed
Nested validators (and/or/not/xor containers).
| Parameter | Type | Description |
|---|---|---|
$name | string | The validator’s name (explicit or generated). |
$validatorClass | string | The resolved, fully-qualified validator class. |
$arguments | `array<int“ | string, mixed>` |
$base | string | The base path from |
$parameters | array``<``string``, ``mixed``> | The fully resolved, already-checked parameter bag. |
$errors | `array<int“ | string, mixed>` |
$methods | array``<``string``> | The HTTP methods this validator applies to (or [”] for all). |
$declaredNames | array``<``string``> | Request parameter names this validator whitelists. |
$children | array``<ValidatorNode> | Nested validators (and/or/not/xor containers). |
Returns mixed