W3cubDocs

/Symfony 4.1

PseudoClassExtension

class PseudoClassExtension extends AbstractExtension

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

from AbstractExtension
callable[] getPseudoClassTranslators()

Returns pseudo-class translators.

callable[] getAttributeMatchingTranslators()

Returns attribute operation translators.

from AbstractExtension
XPathExpr translateRoot(XPathExpr $xpath)
XPathExpr translateFirstChild(XPathExpr $xpath)
XPathExpr translateLastChild(XPathExpr $xpath)
XPathExpr translateFirstOfType(XPathExpr $xpath)
XPathExpr translateLastOfType(XPathExpr $xpath)
XPathExpr translateOnlyChild(XPathExpr $xpath)
XPathExpr translateOnlyOfType(XPathExpr $xpath)
XPathExpr translateEmpty(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[]

XPathExpr translateRoot(XPathExpr $xpath)

Parameters

XPathExpr $xpath

Return Value

XPathExpr

XPathExpr translateFirstChild(XPathExpr $xpath)

Parameters

XPathExpr $xpath

Return Value

XPathExpr

XPathExpr translateLastChild(XPathExpr $xpath)

Parameters

XPathExpr $xpath

Return Value

XPathExpr

XPathExpr translateFirstOfType(XPathExpr $xpath)

Parameters

XPathExpr $xpath

Return Value

XPathExpr

Exceptions

ExpressionErrorException

XPathExpr translateLastOfType(XPathExpr $xpath)

Parameters

XPathExpr $xpath

Return Value

XPathExpr

Exceptions

ExpressionErrorException

XPathExpr translateOnlyChild(XPathExpr $xpath)

Parameters

XPathExpr $xpath

Return Value

XPathExpr

XPathExpr translateOnlyOfType(XPathExpr $xpath)

Parameters

XPathExpr $xpath

Return Value

XPathExpr

Exceptions

ExpressionErrorException

XPathExpr translateEmpty(XPathExpr $xpath)

Parameters

XPathExpr $xpath

Return Value

XPathExpr

string getName()

Returns extension name.

Return Value

string