Piwik\DataTable\Filter\
Deletes every row for which a specific column does not match a supplied regex pattern.
Example
// filter out all rows whose labels doesn't start with piwik
$dataTable->filter('Pattern', array('label', '^piwik'));
The class defines the following methods:
__construct()
— Constructor.filter()
ash; See Pattern.enableRecursive()
ash; Enables/Disables recursive filtering. Inherited from BaseFilter
filterSubTable()
ash; Filters a row's subtable, if one exists and is loaded in memory. Inherited from BaseFilter
filterArray()
ash; See Pattern.__construct()
Constructor.
It accepts the following parameter(s):
$table
(DataTable
) —
$columnToFilter
(string
) —
The column to match with the $patternToSearch
pattern.
$patternToSearch
(string
) —
The regex pattern to use.$invertedMatch
(bool
) —
Whether to invert the pattern or not. If true, will remove rows if they match the pattern.filter()
See Pattern.
It accepts the following parameter(s):
$table
(DataTable
) —It does not return anything or a mixed result.
enableRecursive()
Enables/Disables recursive filtering. Whether this property is actually used is up to the derived BaseFilter class.
It accepts the following parameter(s):
$enable
(bool
) —It does not return anything or a mixed result.
filterSubTable()
Filters a row's subtable, if one exists and is loaded in memory.
$row
(Row
) —
The row whose subtable should be filter.filterArray()
See Pattern.
It accepts the following parameter(s):
$array
(array
) —It returns a array
value.