Skip to content

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.

class ValidatorConfigHandler extends XmlConfigHandler

ExtendsXmlConfigHandler
Since1.0.0
SourceConfig/ValidatorConfigHandler.php
ConstantValueDescription
XML_NAMESPACE'http://quiote.dev/quiote/config/parts/validators/1.1'
MethodDescription
execute(XmlConfigDomDocument $document): mixedCompiles the validators document into the declaration to cache.

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.

ParameterTypeDescription
$documentXmlConfigDomDocument

Returns mixed

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
appendParameter()ParameterHolderAppend a parameter.
appendParameterByRef()ParameterHolderAppend a parameter by reference.
clearParameters()ParameterHolderClear all parameters associated with this request.
getFlatParameterNames()ParameterHolderRetrieve an array of flattened parameter names.
getParameter()ParameterHolderRetrieve a parameter.
getParameterNames()ParameterHolderRetrieve an array of parameter names.
getParameters()ParameterHolderRetrieve an array of parameters.
hasParameter()ParameterHolderIndicates whether or not a parameter exists.
initialize()XmlConfigHandlerInitialize this ConfigHandler.
literalize()BaseConfigHandlerLiteralize a string value.
removeParameter()ParameterHolderRemove a parameter.
replaceConstants()BaseConfigHandlerReplace configuration directive identifiers in a string.
replacePath()BaseConfigHandlerReplace a relative filesystem path with an absolute one.
reset()ParameterHolderRemoves every parameter held, leaving the holder empty for reuse.
setParameter()ParameterHolderSet a parameter.
setParameterByRef()ParameterHolderSet a parameter by reference.
setParameters()ParameterHolderSet an array of parameters.
setParametersByRef()ParameterHolderSet an array of parameters by reference.