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
Details
callable[] getNodeTranslators()
Returns node translators.
These callables will receive the node as first argument and the translator as second argument.
Return Value
callable[] |
callable[] getCombinationTranslators()
Returns combination translators.
Return Value
callable[] |
callable[] getFunctionTranslators()
Returns function translators.
Return Value
callable[] |
callable[] getPseudoClassTranslators()
Returns pseudo-class translators.
Return Value
callable[] |
callable[] getAttributeMatchingTranslators()
Returns attribute operation translators.
Return Value
callable[] |
__construct(int $flags)
Parameters
int | $flags |
$this setFlag(int $flag, bool $on)
Parameters
int | $flag | |
bool | $on |
Return Value
$this |
bool hasFlag(int $flag)
Parameters
int | $flag |
Return Value
bool |
XPathExpr translateSelector(SelectorNode $node, Translator $translator)
Parameters
SelectorNode | $node | |
Translator | $translator |
Return Value
XPathExpr |
XPathExpr translateCombinedSelector(CombinedSelectorNode $node, Translator $translator)
Parameters
CombinedSelectorNode | $node | |
Translator | $translator |
Return Value
XPathExpr |
XPathExpr translateNegation(NegationNode $node, Translator $translator)
Parameters
NegationNode | $node | |
Translator | $translator |
Return Value
XPathExpr |
XPathExpr translateFunction(FunctionNode $node, Translator $translator)
Parameters
FunctionNode | $node | |
Translator | $translator |
Return Value
XPathExpr |
XPathExpr translatePseudo(PseudoNode $node, Translator $translator)
Parameters
PseudoNode | $node | |
Translator | $translator |
Return Value
XPathExpr |
XPathExpr translateAttribute(AttributeNode $node, Translator $translator)
Parameters
AttributeNode | $node | |
Translator | $translator |
Return Value
XPathExpr |
XPathExpr translateClass(ClassNode $node, Translator $translator)
Parameters
ClassNode | $node | |
Translator | $translator |
Return Value
XPathExpr |
XPathExpr translateHash(HashNode $node, Translator $translator)
Parameters
HashNode | $node | |
Translator | $translator |
Return Value
XPathExpr |
XPathExpr translateElement(ElementNode $node)
Parameters
ElementNode | $node |
Return Value
XPathExpr |
string getName()
Returns extension name.
Return Value
string |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.html