NodeExtension

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.

from AbstractExtension
callable[] getFunctionTranslators()

Returns function translators.

from AbstractExtension
callable[] getPseudoClassTranslators()

Returns pseudo-class translators.

from AbstractExtension
callable[] getAttributeMatchingTranslators()

Returns attribute operation translators.

from AbstractExtension
__construct(int $flags)

Constructor.

NodeExtension setFlag(int $flag, bool $on)
bool hasFlag(int $flag)
XPathExpr translateSelector(SelectorNode $node, Translator $translator)
XPathExpr translateCombinedSelector(CombinedSelectorNode $node, Translator $translator)
XPathExpr translateNegation(NegationNode $node, Translator $translator)
XPathExpr translateFunction(FunctionNode $node, Translator $translator)
XPathExpr translatePseudo(PseudoNode $node, Translator $translator)
XPathExpr translateAttribute(AttributeNode $node, Translator $translator)
XPathExpr translateClass(ClassNode $node, Translator $translator)
XPathExpr translateHash(HashNode $node, Translator $translator)
XPathExpr translateElement(ElementNode $node)
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(int $flags)

Constructor.

Parameters

int $flags

NodeExtension setFlag(int $flag, bool $on)

Parameters

int $flag
bool $on

Return Value

NodeExtension

bool hasFlag(int $flag)

Parameters

int $flag

Return Value

bool

XPathExpr translateSelector(SelectorNode $node, Translator $translator)

Parameters

SelectorNode $node
Translator $translator

Return Value

XPathExpr

XPathExpr translateCombinedSelector(CombinedSelectorNode $node, Translator $translator)

Parameters

CombinedSelectorNode $node
Translator $translator

Return Value

XPathExpr

XPathExpr translateNegation(NegationNode $node, Translator $translator)

Parameters

NegationNode $node
Translator $translator

Return Value

XPathExpr

XPathExpr translateFunction(FunctionNode $node, Translator $translator)

Parameters

FunctionNode $node
Translator $translator

Return Value

XPathExpr

XPathExpr translatePseudo(PseudoNode $node, Translator $translator)

Parameters

PseudoNode $node
Translator $translator

Return Value

XPathExpr

XPathExpr translateAttribute(AttributeNode $node, Translator $translator)

Parameters

AttributeNode $node
Translator $translator

Return Value

XPathExpr

XPathExpr translateClass(ClassNode $node, Translator $translator)

Parameters

ClassNode $node
Translator $translator

Return Value

XPathExpr

XPathExpr translateHash(HashNode $node, Translator $translator)

Parameters

HashNode $node
Translator $translator

Return Value

XPathExpr

XPathExpr translateElement(ElementNode $node)

Parameters

ElementNode $node

Return Value

XPathExpr

string getName()

Returns extension name.

Return Value

string
doc_Symfony
2016-10-28 06:24:32
Comments
Leave a Comment

Please login to continue.