function getLastError() { $count = count($this->errors); if ($count > 0) { return $this->errors[$count - 1]; } }