'basis/erreichbarkeit:rw')); // Load model ErreichbarkeitModel $this->load->model('ressource/erreichbarkeit_model', 'ErreichbarkeitModel'); } /** * @return void */ public function getErreichbarkeit() { $erreichbarkeit_kurzbz = $this->get('erreichbarkeit_kurzbz'); if (isset($erreichbarkeit_kurzbz)) { $result = $this->ErreichbarkeitModel->load($erreichbarkeit_kurzbz); $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } /** * @return void */ public function postErreichbarkeit() { if ($this->_validate($this->post())) { if (isset($this->post()['erreichbarkeit_kurzbz'])) { $result = $this->ErreichbarkeitModel->update($this->post()['erreichbarkeit_kurzbz'], $this->post()); } else { $result = $this->ErreichbarkeitModel->insert($this->post()); } $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } private function _validate($erreichbarkeit = NULL) { return true; } }