public function deleteRowsOffset($offset, $limit = null)
{
if ($limit === 0) {
return 0;
}
$count = $this->getRowsCount();
if ($offset >= $count) {
return 0;
}
// if we delete until the end, we delete the summary row as well
if (is_null($limit) || $limit >= $count) {
$this->summaryRow = null;
}
if (is_null($limit)) {
array_splice($this->rows, $offset);
} else {
array_splice($this->rows, $offset, $limit);
}
return $count - $this->getRowsCount();
}