class FunctionExtension extends AbstractExtension

XPath expression translator function 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.

translateNthChild(XPathExpr $xpath, FunctionNode $function, bool $last = false, bool $addNameTest = true)

No description

translateNthLastChild(XPathExpr $xpath, FunctionNode $function)

No description

translateNthOfType(XPathExpr $xpath, FunctionNode $function)

No description

translateNthLastOfType(XPathExpr $xpath, FunctionNode $function)

No description

translateContains(XPathExpr $xpath, FunctionNode $function)

No description

translateLang(XPathExpr $xpath, FunctionNode $function)

No description

string
getName()

Returns extension name.

Details

in AbstractExtension at line line 29
callable[] getNodeTranslators()

Returns node translators.

These callables will receive the node as first argument and the translator as second argument.

Return Value

callable[]

in AbstractExtension at line line 37
callable[] getCombinationTranslators()

Returns combination translators.

Return Value

callable[]

at line line 36
callable[] getFunctionTranslators()

Returns function translators.

Return Value

callable[]

in AbstractExtension at line line 53
callable[] getPseudoClassTranslators()

Returns pseudo-class translators.

Return Value

callable[]

in AbstractExtension at line line 61
callable[] getAttributeMatchingTranslators()

Returns attribute operation translators.

Return Value

callable[]

at line line 58
XPathExpr translateNthChild(XPathExpr $xpath, FunctionNode $function, bool $last = false, bool $addNameTest = true)

Parameters

XPathExpr $xpath
FunctionNode $function
bool $last
bool $addNameTest

Return Value

XPathExpr

Exceptions

ExpressionErrorException

at line line 119
XPathExpr translateNthLastChild(XPathExpr $xpath, FunctionNode $function)

Parameters

XPathExpr $xpath
FunctionNode $function

Return Value

XPathExpr

at line line 130
XPathExpr translateNthOfType(XPathExpr $xpath, FunctionNode $function)

Parameters

XPathExpr $xpath
FunctionNode $function

Return Value

XPathExpr

at line line 143
XPathExpr translateNthLastOfType(XPathExpr $xpath, FunctionNode $function)

Parameters

XPathExpr $xpath
FunctionNode $function

Return Value

XPathExpr

Exceptions

ExpressionErrorException

at line line 160
XPathExpr translateContains(XPathExpr $xpath, FunctionNode $function)

Parameters

XPathExpr $xpath
FunctionNode $function

Return Value

XPathExpr

Exceptions

ExpressionErrorException

at line line 186
XPathExpr translateLang(XPathExpr $xpath, FunctionNode $function)

Parameters

XPathExpr $xpath
FunctionNode $function

Return Value

XPathExpr

Exceptions

ExpressionErrorException

at line line 207
string getName()

Returns extension name.

Return Value

string