'basis/pruefungsanmeldung:rw')); // Load model PruefungsanmeldungModel $this->load->model('education/Pruefungsanmeldung_model', 'PruefungsanmeldungModel'); } /** * @return void */ public function getPruefungsanmeldung() { $pruefungsanmeldung_id = $this->get('pruefungsanmeldung_id'); if (isset($pruefungsanmeldung_id)) { $result = $this->PruefungsanmeldungModel->load($pruefungsanmeldung_id); $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } /** * @return void */ public function postPruefungsanmeldung() { if ($this->_validate($this->post())) { if (isset($this->post()['pruefungsanmeldung_id'])) { $result = $this->PruefungsanmeldungModel->update($this->post()['pruefungsanmeldung_id'], $this->post()); } else { $result = $this->PruefungsanmeldungModel->insert($this->post()); } $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } private function _validate($pruefungsanmeldung = NULL) { return true; } }