public function flushEmptyRows($onAfterFilter = null)
{
// Update the _flushOnAfterFilter flag and return.
if (!empty($onAfterFilter)) {
$this->_flushOnAfterFilter = (bool) $onAfterFilter;
return $this;
}
// Parse the CSV.
if (!isset($this->_rows)) {
$this->parse();
}
// Walk through the rows.
foreach ($this->_rows as $index => &$row) {
$this->_flushEmptyRow($row, $index);
}
// Remove garbage.
unset($row, $index);
return $this;
}