W3cubDocs

/Symfony 4.1

XPathExpr

class XPathExpr

XPath expression translator interface.

This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect.

Methods

__construct(string $path = '', string $element = '*', string $condition = '', bool $starPrefix = false)
string getElement()
XPathExpr addCondition(string $condition)
string getCondition()
XPathExpr addNameTest()
XPathExpr addStarPrefix()
XPathExpr join(string $combiner, XPathExpr $expr)

Joins another XPathExpr with a combiner.

string __toString()

Details

__construct(string $path = '', string $element = '*', string $condition = '', bool $starPrefix = false)

Parameters

string $path
string $element
string $condition
bool $starPrefix

string getElement()

Return Value

string

XPathExpr addCondition(string $condition)

Parameters

string $condition

Return Value

XPathExpr

string getCondition()

Return Value

string

XPathExpr addNameTest()

Return Value

XPathExpr

XPathExpr addStarPrefix()

Return Value

XPathExpr

XPathExpr join(string $combiner, XPathExpr $expr)

Joins another XPathExpr with a combiner.

Parameters

string $combiner
XPathExpr $expr

Return Value

XPathExpr

string __toString()

Return Value

string

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/CssSelector/XPath/XPathExpr.html