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.

callable[]
getFunctionTranslators()

Returns function translators.

callable[]
getPseudoClassTranslators()

Returns pseudo-class translators.

callable[]
getAttributeMatchingTranslators()

Returns attribute operation translators.

__construct(int $flags = 0)

No description

$this
setFlag(int $flag, bool $on)

No description

bool
hasFlag(int $flag)

No description

translateSelector(SelectorNode $node, Translator $translator)

No description

translateNegation(NegationNode $node, Translator $translator)

No description

translateFunction(FunctionNode $node, Translator $translator)

No description

translatePseudo(PseudoNode $node, Translator $translator)

No description

translateAttribute(AttributeNode $node, Translator $translator)

No description

translateClass(ClassNode $node, Translator $translator)

No description

translateHash(HashNode $node, Translator $translator)

No description

translateElement(ElementNode $node)

No description

string
getName()

Returns extension name.

Details

at line 65
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 37
callable[] getCombinationTranslators()

Returns combination translators.

Return Value

callable[]

in AbstractExtension at line 45
callable[] getFunctionTranslators()

Returns function translators.

Return Value

callable[]

in AbstractExtension at line 53
callable[] getPseudoClassTranslators()

Returns pseudo-class translators.

Return Value

callable[]

in AbstractExtension at line 61
callable[] getAttributeMatchingTranslators()

Returns attribute operation translators.

Return Value

callable[]

at line 36
__construct(int $flags = 0)

Parameters

int $flags

at line 44
$this setFlag(int $flag, bool $on)

Parameters

int $flag
bool $on

Return Value

$this

at line 57
bool hasFlag(int $flag)

Parameters

int $flag

Return Value

bool

at line 80
XPathExpr translateSelector(SelectorNode $node, Translator $translator)

Parameters

SelectorNode $node
Translator $translator

Return Value

XPathExpr

at line 85
XPathExpr translateCombinedSelector(CombinedSelectorNode $node, Translator $translator)

Parameters

CombinedSelectorNode $node
Translator $translator

Return Value

XPathExpr

at line 90
XPathExpr translateNegation(NegationNode $node, Translator $translator)

Parameters

NegationNode $node
Translator $translator

Return Value

XPathExpr

at line 103
XPathExpr translateFunction(FunctionNode $node, Translator $translator)

Parameters

FunctionNode $node
Translator $translator

Return Value

XPathExpr

at line 110
XPathExpr translatePseudo(PseudoNode $node, Translator $translator)

Parameters

PseudoNode $node
Translator $translator

Return Value

XPathExpr

at line 117
XPathExpr translateAttribute(AttributeNode $node, Translator $translator)

Parameters

AttributeNode $node
Translator $translator

Return Value

XPathExpr

at line 142
XPathExpr translateClass(ClassNode $node, Translator $translator)

Parameters

ClassNode $node
Translator $translator

Return Value

XPathExpr

at line 149
XPathExpr translateHash(HashNode $node, Translator $translator)

Parameters

HashNode $node
Translator $translator

Return Value

XPathExpr

at line 156
XPathExpr translateElement(ElementNode $node)

Parameters

ElementNode $node

Return Value

XPathExpr

at line 188
string getName()

Returns extension name.

Return Value

string