'basis/konto:rw')); // Load model KontoModel $this->load->model('crm/konto_model', 'KontoModel'); } /** * @return void */ public function getKonto() { $buchungsnr = $this->get('buchungsnr'); if (isset($buchungsnr)) { $result = $this->KontoModel->load($buchungsnr); $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } /** * @return void */ public function postKonto() { if ($this->_validate($this->post())) { if (isset($this->post()['buchungsnr'])) { $result = $this->KontoModel->update($this->post()['buchungsnr'], $this->post()); } else { $result = $this->KontoModel->insert($this->post()); } $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } private function _validate($konto = NULL) { return true; } }