Exemplo n.º 1
0
 /**
  * Execute middleware and controller
  */
 public function execute()
 {
     try {
         $this->executeMiddleware();
         $this->executeController();
     } catch (PageNotFoundException $e) {
         $controllerObject = new AppController($this->container);
         $controllerObject->notFound($e->hasLayout());
     } catch (AccessForbiddenException $e) {
         $controllerObject = new AppController($this->container);
         $controllerObject->accessForbidden($e->hasLayout());
     }
 }
Exemplo n.º 2
0
 /**
  * Execute middleware and controller
  */
 public function execute()
 {
     try {
         $this->executeMiddleware();
         if (!$this->response->isResponseAlreadySent()) {
             $this->executeController();
         }
     } catch (PageNotFoundException $e) {
         $controllerObject = new AppController($this->container);
         $controllerObject->notFound($e->hasLayout());
     } catch (AccessForbiddenException $e) {
         $controllerObject = new AppController($this->container);
         $controllerObject->accessForbidden($e->hasLayout(), $e->getMessage());
     }
 }