ValidatorConfigHandler
Compiles a validators.xml document into a compiled Quiote configuration file: a declaration of the validators to build, which ValidatorDeclarationApplier registers onto a validation manager.
The artifact is data and cannot register anything itself.
The XML interpretation lives in ValidatorPlanBuilder, which builds a format-independent ValidatorPlan (see Quiote\Validator\Compiler\Ir). This handler is a thin adapter: parse to IR, emit the declaration from that IR via RuntimeDeclarationEmitter, wrap in the standard compiled-file header. The same ValidatorPlan also feeds a fluent-source emitter for hand-committable, opcacheable validator files, and a non-XML config front-end builds the same IR without touching this class or the emitter.
Synopsis
Section titled “Synopsis”class ValidatorConfigHandler extends XmlConfigHandler
| Extends | XmlConfigHandler |
| Since | 1.0.0 |
| Source | Config/ValidatorConfigHandler.php |
Constants
Section titled “Constants”| Constant | Value | Description |
|---|---|---|
XML_NAMESPACE | 'http://quiote.dev/quiote/config/parts/validators/1.1' |
Methods
Section titled “Methods”| Method | Description |
|---|---|
execute(XmlConfigDomDocument $document): mixed | Compiles the validators document into the declaration to cache. |
execute()
Section titled “execute()”public function execute(XmlConfigDomDocument $document): mixed
Compiles the validators document into the declaration to cache.
The XML is first turned into a format-independent validator plan, which is then emitted as a plain data declaration. The result registers nothing by itself; applying it to a validation manager is a separate step.
| Parameter | Type | Description |
|---|---|---|
$document | XmlConfigDomDocument |
Returns mixed
Inherited methods
Section titled “Inherited methods”These come from an ancestor and are documented where they are declared.
| Method | Declared in | Description |
|---|---|---|
appendParameter() | ParameterHolder | Append a parameter. |
appendParameterByRef() | ParameterHolder | Append a parameter by reference. |
clearParameters() | ParameterHolder | Clear all parameters associated with this request. |
getFlatParameterNames() | ParameterHolder | Retrieve an array of flattened parameter names. |
getParameter() | ParameterHolder | Retrieve a parameter. |
getParameterNames() | ParameterHolder | Retrieve an array of parameter names. |
getParameters() | ParameterHolder | Retrieve an array of parameters. |
hasParameter() | ParameterHolder | Indicates whether or not a parameter exists. |
initialize() | XmlConfigHandler | Initialize this ConfigHandler. |
literalize() | BaseConfigHandler | Literalize a string value. |
removeParameter() | ParameterHolder | Remove a parameter. |
replaceConstants() | BaseConfigHandler | Replace configuration directive identifiers in a string. |
replacePath() | BaseConfigHandler | Replace a relative filesystem path with an absolute one. |
reset() | ParameterHolder | Removes every parameter held, leaving the holder empty for reuse. |
setParameter() | ParameterHolder | Set a parameter. |
setParameterByRef() | ParameterHolder | Set a parameter by reference. |
setParameters() | ParameterHolder | Set an array of parameters. |
setParametersByRef() | ParameterHolder | Set an array of parameters by reference. |