class RecursiveParser

Properties

protected array $callbacks
protected array $groupMatches
protected array $matchGroups
protected string $regexp

Methods

mixed
parse(string $str, string $name = '')

Parse given string

void
setMatchers(array $matchers)

Set the list of matchers used by this parser

array
getArguments(array $matches, string $name)

Get the list of arguments produced by a regexp's match

array
getMatchersConfig(array $matchers)

Collect, normalize, sort and return the config for all matchers

static int
sortMatcherConfig(array $a, array $b)

Compare two matchers' config

Details

at line 42
mixed parse(string $str, string $name = '')

Parse given string

Parameters

string $str
string $name

Allowed match, either match name or group name (default: allow all)

Return Value

mixed

at line 73
void setMatchers(array $matchers)

Set the list of matchers used by this parser

Parameters

array $matchers

Return Value

void

at line 111
protected array getArguments(array $matches, string $name)

Get the list of arguments produced by a regexp's match

Parameters

array $matches

Regexp matches

string $name

Regexp name

Return Value

array

at line 145
protected array getMatchersConfig(array $matchers)

Collect, normalize, sort and return the config for all matchers

Parameters

array $matchers

Return Value

array

at line 182
static protected int sortMatcherConfig(array $a, array $b)

Compare two matchers' config

Parameters

array $a
array $b

Return Value

int