class PHP80Functions extends AbstractConvertor

Properties

protected RecursiveParser $parser from  AbstractRecursiveMatcher

Methods

void
__construct(RecursiveParser $parser)

No description

mixed
recurse(string $str, string $restrict = '')

Parse given string and return its value

string
getAttributeName(string $expr)

Retrieve the attribute name from an attribute expression

string
normalizeNumber(string $sign, string $number)

Normalize a number representation

array
getMatchers()

Return the matchers configuration

string
parseContains(string $haystack, string $needle)

Convert a call to contains()

string
parseEndsWith(string $string, string $substring)

Convert a call to ends-with()

string
parseNotContains(string $haystack, string $needle)

Convert a call to not(contains())

string
parseNotEndsWith(string $string, string $substring)

Convert a call to not(ends-with())

string
parseNotStartsWith(string $string, string $substring)

Convert a call to not(starts-with())

string
parseStartsWith(string $string, string $substring)

Convert a call to starts-with()

Details

void __construct(RecursiveParser $parser)

No description

Parameters

RecursiveParser $parser

Return Value

void

protected mixed recurse(string $str, string $restrict = '')

Parse given string and return its value

Parameters

string $str
string $restrict

Pipe-separated list of allowed matches (ignored if empty)

Return Value

mixed

in AbstractConvertor at line 20
protected string getAttributeName(string $expr)

Retrieve the attribute name from an attribute expression

Parameters

string $expr

XPath expression for an attribute, e.g. '@foo'

Return Value

string

Attribute name, e.g. 'foo'

in AbstractConvertor at line 32
protected string normalizeNumber(string $sign, string $number)

Normalize a number representation

Parameters

string $sign
string $number

Return Value

string

at line 15
array getMatchers()

Return the matchers configuration

Match name as key. Can be prefixed with a colon-separated list of groups, e.g. "Group:Name". Value must be a string or an array with the following elements:

  • regexp: the regular expression used to match input.
  • order: used to sort matchers. Defaults to 0.
  • groups: list of groups this match belongs to. Defaults to an empty array.
  • callback: called with the matched strings. Defaults to [$this, "parseX"] where X is the match name.

If the config is a string, the string is used for the "regexp" element.

Return Value

array

at line 36
string parseContains(string $haystack, string $needle)

Convert a call to contains()

Parameters

string $haystack

Expression for the haystack part of the call

string $needle

Expression for the needle part of the call

Return Value

string

at line 48
string parseEndsWith(string $string, string $substring)

Convert a call to ends-with()

Parameters

string $string

Expression for the string part of the call

string $substring

Expression for the substring part of the call

Return Value

string

at line 60
string parseNotContains(string $haystack, string $needle)

Convert a call to not(contains())

Parameters

string $haystack

Expression for the haystack part of the call

string $needle

Expression for the needle part of the call

Return Value

string

at line 72
string parseNotEndsWith(string $string, string $substring)

Convert a call to not(ends-with())

Parameters

string $string

Expression for the string part of the call

string $substring

Expression for the substring part of the call

Return Value

string

at line 84
string parseNotStartsWith(string $string, string $substring)

Convert a call to not(starts-with())

Parameters

string $string

Expression for the string part of the call

string $substring

Expression for the substring part of the call

Return Value

string

at line 96
string parseStartsWith(string $string, string $substring)

Convert a call to starts-with()

Parameters

string $string

Expression for the string part of the call

string $substring

Expression for the substring part of the call

Return Value

string