/** * Get all result rows as an array. * * @return array */ public function getAll() { $res = array(); if (empty($this->_result)) { return json_encode(array()); } foreach ($this->_result as $row) { $row = ModelHelper::removeNumericKeys($row); $res[] = $row; } return json_encode($res); }