'basis/lvregel:rw')); // Load model LvregelModel $this->load->model('education/Lvregel_model', 'LvregelModel'); } /** * @return void */ public function getLvregel() { $lvregel_id = $this->get('lvregel_id'); if (isset($lvregel_id)) { $result = $this->LvregelModel->load($lvregel_id); $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } /** * @return void */ public function postLvregel() { if ($this->_validate($this->post())) { if (isset($this->post()['lvregel_id'])) { $result = $this->LvregelModel->update($this->post()['lvregel_id'], $this->post()); } else { $result = $this->LvregelModel->insert($this->post()); } $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } private function _validate($lvregel = NULL) { return true; } }