abstract class FilterHelper

Properties

static protected RecursiveParser $parser

Methods

static RecursiveParser
getParser()

Return the cached instance of RecursiveParser

static bool
isAllowed(string $filter, array $allowedFilters)

Test whether given filter is a default filter or is in the list of allowed filters

static array
parse(string $filterString)

Parse a filter definition

Details

at line 26
static RecursiveParser getParser()

Return the cached instance of RecursiveParser

Return Value

RecursiveParser

at line 44
static bool isAllowed(string $filter, array $allowedFilters)

Test whether given filter is a default filter or is in the list of allowed filters

Parameters

string $filter
array $allowedFilters

Return Value

bool

at line 63
static array parse(string $filterString)

Parse a filter definition

Parameters

string $filterString

Filter definition such as "#number" or "strtolower($attrValue)"

Return Value

array

Associative array with a "filter" element and optionally a "params" array