HtmlExtension
class HtmlExtension extends AbstractExtension
XPath expression translator HTML extension.
This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect.
Methods
callable[] | getNodeTranslators() Returns node translators. | from AbstractExtension |
callable[] | getCombinationTranslators() Returns combination translators. | from AbstractExtension |
callable[] | getFunctionTranslators() Returns function translators. | |
callable[] | getPseudoClassTranslators() Returns pseudo-class translators. | |
callable[] | getAttributeMatchingTranslators() Returns attribute operation translators. | from AbstractExtension |
__construct(Translator $translator) | ||
XPathExpr | translateChecked(XPathExpr $xpath) | |
XPathExpr | translateLink(XPathExpr $xpath) | |
XPathExpr | translateDisabled(XPathExpr $xpath) | |
XPathExpr | translateEnabled(XPathExpr $xpath) | |
XPathExpr | translateLang(XPathExpr $xpath, FunctionNode $function) | |
XPathExpr | translateSelected(XPathExpr $xpath) | |
XPathExpr | translateInvalid(XPathExpr $xpath) | |
XPathExpr | translateHover(XPathExpr $xpath) | |
XPathExpr | translateVisited(XPathExpr $xpath) | |
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(Translator $translator)
Parameters
Translator | $translator |
XPathExpr translateChecked(XPathExpr $xpath)
Parameters
XPathExpr | $xpath |
Return Value
XPathExpr |
XPathExpr translateLink(XPathExpr $xpath)
Parameters
XPathExpr | $xpath |
Return Value
XPathExpr |
XPathExpr translateDisabled(XPathExpr $xpath)
Parameters
XPathExpr | $xpath |
Return Value
XPathExpr |
XPathExpr translateEnabled(XPathExpr $xpath)
Parameters
XPathExpr | $xpath |
Return Value
XPathExpr |
XPathExpr translateLang(XPathExpr $xpath, FunctionNode $function)
Parameters
XPathExpr | $xpath | |
FunctionNode | $function |
Return Value
XPathExpr |
Exceptions
ExpressionErrorException |
XPathExpr translateSelected(XPathExpr $xpath)
Parameters
XPathExpr | $xpath |
Return Value
XPathExpr |
XPathExpr translateInvalid(XPathExpr $xpath)
Parameters
XPathExpr | $xpath |
Return Value
XPathExpr |
XPathExpr translateHover(XPathExpr $xpath)
Parameters
XPathExpr | $xpath |
Return Value
XPathExpr |
XPathExpr translateVisited(XPathExpr $xpath)
Parameters
XPathExpr | $xpath |
Return Value
XPathExpr |
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/HtmlExtension.html