public function _applyFilters(array $row)
{
if (!empty($this->_filters)) {
// Run filters in the same order they were registered.
foreach ($this->_filters as &$filter) {
$callable =& $filter['callable'];
$column =& $filter['column'];
$arguments =& $filter['args'];
// Apply to the entire row.
if (is_null($column)) {
$row = call_user_func_array($callable, array_merge(array(&$row), $arguments));
} else {
$row[$column] = call_user_func_array($callable, array_merge(array(&$row[$column]), $arguments));
}
}
// Unset references.
unset($filter, $callable, $column, $arguments);
}
return $row;
}