public function execute() { $this->apf = APF::get_instance(); $this->request = $this->apf->get_request(); $this->response = $this->apf->get_response(); $attributes = $this->request->get_attributes(); if (!empty($attributes)) { foreach ($attributes as $key => $value) { $this->assign_data($key, $value); } } parent::execute(); }
/** * overwrite output * @param $status * @param $msg */ public function outPut($status, $msg) { $this->objAPF->get_response()->set_content_type("application/json"); exit(json_encode(array('status' => $status > 0 ? 'ok' : 'error', 'data' => $msg, 'msg' => $msg))); }