'basis/konto:rw')); // Load model KontoModel $this->load->model('accounting/konto_model', 'KontoModel'); } /** * @return void */ public function getKonto() { $kontoID = $this->get('konto_id'); if (isset($kontoID)) { $result = $this->KontoModel->load($kontoID); $this->response($result, REST_Controller::HTTP_OK); } else { $this->response(); } } /** * @return void */ public function postKonto() { if ($this->_validate($this->post())) { if (isset($this->post()['konto_id'])) { $result = $this->KontoModel->update($this->post()['konto_id'], $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; } }