class BooleanFunctions 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
parseBooleanParam(string $expr)

Convert a call to boolean() with a param

string
parseFalse()

Convert a call to false()

string
parseHasAttribute(string $expr)

Convert a call to boolean() with an attribute

string
parseHasAttributes()

Convert a call to boolean(@*)

string
parseNot(string $expr)

Convert a call to not() with a boolean expression

string
parseNotAttribute(string $expr)

Convert a call to not() with an attribute

string
parseNotParam(string $expr)

Convert a call to not() with a param

string
parseTrue()

Convert a call to true()

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 41
string parseBooleanParam(string $expr)

Convert a call to boolean() with a param

Parameters

string $expr

Return Value

string

at line 51
string parseFalse()

Convert a call to false()

Return Value

string

at line 62
string parseHasAttribute(string $expr)

Convert a call to boolean() with an attribute

Parameters

string $expr

Return Value

string

at line 74
string parseHasAttributes()

Convert a call to boolean(@*)

Return Value

string

at line 85
string parseNot(string $expr)

Convert a call to not() with a boolean expression

Parameters

string $expr

Return Value

string

at line 96
string parseNotAttribute(string $expr)

Convert a call to not() with an attribute

Parameters

string $expr

Return Value

string

at line 109
string parseNotParam(string $expr)

Convert a call to not() with a param

Parameters

string $expr

Return Value

string

at line 119
string parseTrue()

Convert a call to true()

Return Value

string