public getLastRow ( ) : |
||
return | The last row or `false` if it cannot be found. |
public function getLastRow()
{
if (!is_null($this->summaryRow)) {
return $this->summaryRow;
}
if (count($this->rows) == 0) {
return false;
}
return end($this->rows);
}
private function getFirstAndLastDataPointsForMetric($metric) { $first = 0; $firstTable = $this->dataTable->getFirstRow(); if (!empty($firstTable)) { $row = $firstTable->getFirstRow(); if (!empty($row)) { $first = floatval($row->getColumn($metric)); } } $last = 0; $lastTable = $this->dataTable->getLastRow(); if (!empty($lastTable)) { $row = $lastTable->getFirstRow(); if (!empty($row)) { $last = floatval($row->getColumn($metric)); } } return array($first, $last); }