protected function return_result() { if (count($this->errors) == 1) { $this->errors = array('top_level' => current($this->errors)); } parent::return_result(); }
private function return_response() { if (!empty($this->errors)) { $this->response['next'] = 'fail'; } parent::return_result(); }