'basis/zgv:rw')); // Load model ZgvModel $this->load->model('codex/Zgv_model', 'ZgvModel'); } /** * @return void */ public function getZgv() { $zgv_code = $this->get('zgv_code'); if (isset($zgv_code)) { $result = $this->ZgvModel->load($zgv_code); $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } /** * @return zgv */ public function getAllZgv() { $this->response($this->Zgv_model->getAllZgv(), REST_Controller::HTTP_OK); } /** * @return void */ public function postZgv() { if ($this->_validate($this->post())) { if (isset($this->post()['zgv_code'])) { $result = $this->ZgvModel->update($this->post()['zgv_code'], $this->post()); } else { $result = $this->ZgvModel->insert($this->post()); } $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } private function _validate($zgv = NULL) { return true; } }