Example #1
0
 /**
  *
  */
 public function processRequest()
 {
     ini_set("allow_url_fopen", true);
     $this->request->setUri()->setMethod(filter_input(INPUT_SERVER, "REQUEST_METHOD"))->setId($this->request->getIdFromUri())->setData($this->request->substractData());
     $controller = $this->getController();
     $actionName = strtolower($this->request->method);
     if ($controller) {
         $this->response->content = $controller->{$actionName}();
         $this->response->setCode($controller->getResponseStatusCode());
         $this->response->send();
     } else {
         $this->response->error("Controller <" . $this->getControllerName() . "> does not exist or not loaded", 500);
     }
 }