NodeExtension

class NodeExtension extends AbstractExtension XPath expression translator node extension. This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect. Constants ELEMENT_NAME_IN_LOWER_CASE ATTRIBUTE_NAME_IN_LOWER_CASE ATTRIBUTE_VALUE_IN_LOWER_CASE Methods callable[] getNodeTranslators() Returns node translators. callable[] getCombinationTranslators() Returns combination translators. from Abstract

NodeDefinition::validate()

ExprBuilder validate() Sets an expression to run for the validation. The expression receives the value of the node and must return it. It can modify it. An exception should be thrown when the node is not valid. Return Value ExprBuilder

NodeDefinition::treatTrueLike()

NodeDefinition|$this treatTrueLike(mixed $value) Sets the equivalent value used when the node contains true. Parameters mixed $value Return Value NodeDefinition|$this

NodeDefinition::treatNullLike()

NodeDefinition|$this treatNullLike(mixed $value) Sets the equivalent value used when the node contains null. Parameters mixed $value Return Value NodeDefinition|$this

NodeDefinition::treatFalseLike()

NodeDefinition|$this treatFalseLike(mixed $value) Sets the equivalent value used when the node contains false. Parameters mixed $value Return Value NodeDefinition|$this

NodeDefinition::setParent()

NodeDefinition|$this setParent(NodeParentInterface $parent) Sets the parent node. Parameters NodeParentInterface $parent The parent Return Value NodeDefinition|$this

NodeDefinition::isRequired()

NodeDefinition|$this isRequired() Sets the node as required. Return Value NodeDefinition|$this

NodeDefinition::info()

NodeDefinition|$this info(string $info) Sets info message. Parameters string $info The info text Return Value NodeDefinition|$this

NodeDefinition::getNode()

NodeInterface getNode(bool $forceRootNode = false) Creates the node. Parameters bool $forceRootNode Whether to force this node as the root node Return Value NodeInterface

NodeDefinition::example()

NodeDefinition|$this example(string|array $example) Sets example configuration. Parameters string|array $example Return Value NodeDefinition|$this