'basis/anrechnung:rw')); // Load model AnrechnungModel $this->load->model('education/Anrechnung_model', 'AnrechnungModel'); } /** * @return void */ public function getAnrechnung() { $anrechnung_id = $this->get('anrechnung_id'); if (isset($anrechnung_id)) { $result = $this->AnrechnungModel->load($anrechnung_id); $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } /** * @return void */ public function postAnrechnung() { if ($this->_validate($this->post())) { if (isset($this->post()['anrechnung_id'])) { $result = $this->AnrechnungModel->update($this->post()['anrechnung_id'], $this->post()); } else { $result = $this->AnrechnungModel->insert($this->post()); } $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } private function _validate($anrechnung = NULL) { return true; } }