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