Piwik\DataTable\Filter\
Deletes all rows for which a specific column has a value that is lower than specified minimum threshold value.
Basic usage examples
// remove all countries from UserCountry.getCountry that have less than 3 visits
$dataTable = // ... get a DataTable whose queued filters have been run ...
$dataTable->filter('ExcludeLowPopulation', array('nb_visits', 3));
// remove all countries from UserCountry.getCountry whose percent of total visits is less than 5%
$dataTable = // ... get a DataTable whose queued filters have been run ...
$dataTable->filter('ExcludeLowPopulation', array('nb_visits', false, 0.05));
// remove all countries from UserCountry.getCountry whose bounce rate is less than 10%
$dataTable = // ... get a DataTable that has a numerical bounce_rate column ...
$dataTable->filter('ExcludeLowPopulation', array('bounce_rate', 0.10));
The class defines the following methods:
__construct() — Constructor.filter() ash; See ExcludeLowPopulation.enableRecursive() ash; Enables/Disables recursive filtering. Inherited from BaseFilterfilterSubTable() ash; Filters a row's subtable, if one exists and is loaded in memory. Inherited from BaseFilter__construct()Constructor.
It accepts the following parameter(s):
$table (DataTable) —
$columnToFilter (string) —
The name of the column whose value will determine whether a row is deleted or not.
$minimumValue (Piwik\DataTable\Filter\number|false) —
The minimum column value. Rows with column values < this number will be deleted. If false, $minimumPercentageThreshold is used.$minimumPercentageThreshold (bool|float) —
If supplied, column values must be a greater percentage of the sum of all column values than this percentage.filter()See ExcludeLowPopulation.
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.