public function cypher() { $data = $this->get_data(); $query = isset($data['query']) ? $data['query'] : ''; if ($query) { $result = $this->model->cypher($query); if ($result) { $this->send_response(200, $result); } else { $this->send_response(400, NULL, Kohana::lang('mining.result_empty')); } } else { $this->send_response(400, NULL, Kohana::lang('mining.invalid_request')); } }