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.

callable[]
getCombinationTranslators()

Returns combination translators.

callable[]
getFunctionTranslators()

Returns function translators.

callable[]
getPseudoClassTranslators()

Returns pseudo-class translators.

callable[]
getAttributeMatchingTranslators()

Returns attribute operation translators.

__construct(Translator $translator)

No description

translateChecked(XPathExpr $xpath)

No description

translateLink(XPathExpr $xpath)

No description

translateDisabled(XPathExpr $xpath)

No description

translateEnabled(XPathExpr $xpath)

No description

translateLang(XPathExpr $xpath, FunctionNode $function)

No description

translateSelected(XPathExpr $xpath)

No description

translateInvalid(XPathExpr $xpath)

No description

translateHover(XPathExpr $xpath)

No description

translateVisited(XPathExpr $xpath)

No description

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

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