'basis/benutzerfunktion:rw')); // Load model BenutzerfunktionModel $this->load->model('person/benutzerfunktion_model', 'BenutzerfunktionModel'); } /** * @return void */ public function getBenutzerfunktion() { $benutzerfunktionID = $this->get('benutzerfunktion_id'); if (isset($benutzerfunktionID)) { $result = $this->BenutzerfunktionModel->load($benutzerfunktionID); $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } /** * @return void */ public function postBenutzerfunktion() { if ($this->_validate($this->post())) { if (isset($this->post()['benutzerfunktion_id'])) { $result = $this->BenutzerfunktionModel->update($this->post()['benutzerfunktion_id'], $this->post()); } else { $result = $this->BenutzerfunktionModel->insert($this->post()); } $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } private function _validate($benutzerfunktion = NULL) { return true; } }