XPathConvertor
class XPathConvertor
Properties
array | $features | ||
protected RecursiveParser | $parser |
Methods
Constructor
Convert an XPath expression (used in a condition) into PHP code
Convert an XPath expression (used as value) into PHP code
Export an XPath expression as PHP with special consideration for XPath variables
Convert a "current()" XPath expression to its PHP source representation
Convert a fragment of an XPath expression to its PHP source representation
Convert an XSLT parameter to its PHP source representation
Generate and return the a parser with the default set of matchers
Return (and if necessary, create) the cached instance of the XPath parser
Tokenize an XPath expression for use in PHP
Details
at line 37
__construct(RecursiveParser|null $parser = null)
Constructor
at line 58
string
convertCondition(string $expr)
Convert an XPath expression (used in a condition) into PHP code
This method is similar to convertXPath() but it selectively replaces some simple conditions with the corresponding DOM method for performance reasons
at line 99
string
convertXPath(string $expr)
Convert an XPath expression (used as value) into PHP code
at line 129
protected string
exportXPath(string $expr)
Export an XPath expression as PHP with special consideration for XPath variables
Will return PHP source representing the XPath expression, with special consideration for XPath variables which are returned as a method call to XPath::export()
at line 146
protected string
exportXPathCurrent()
Convert a "current()" XPath expression to its PHP source representation
at line 157
protected string
exportXPathFragment(string $fragment)
Convert a fragment of an XPath expression to its PHP source representation
at line 168
protected string
exportXPathParam(string $param)
Convert an XSLT parameter to its PHP source representation
at line 180
protected RecursiveParser
getDefaultParser()
Generate and return the a parser with the default set of matchers
at line 210
protected RecursiveParser
getParser()
Return (and if necessary, create) the cached instance of the XPath parser
at line 226
protected array
tokenizeXPathForExport(string $expr)
Tokenize an XPath expression for use in PHP