Closed kolik236 closed 5 years ago
function execute () { $methods = get_class_methods($this);
if (in_array('action' . ucfirst($this->action), $methods)) { $this->accessControl->checkPermission($this->getUserRole(), $this->action); $this->response->data = (object)call_user_func_array([$this, 'action' . $this->action], []); error_log($this->getUserRole()); } else { error_log($this->action); throw new \Exception('Action "' . $this->action . '" not found', 404); } $this->response->success = true; $this->response->data->code = 220; $this->display(); }
{ "success": false, "time": "2019-05-09 14:15:13", "data": { "messages": [ "Action \"permissions\" not found" ], "code": 404 } }
How did you fix this?
function execute () { $methods = get_class_methods($this);
{ "success": false, "time": "2019-05-09 14:15:13", "data": { "messages": [ "Action \"permissions\" not found" ], "code": 404 } }