protected function before()
 {
     parent::before();
     $this->session = Application::getInstance()->getDiContainer()->getSessionRegistry()->getSession('www');
     $this->authenticationHelper = new AuthenticationHelper($this->session);
     if (!$this->authenticationHelper->isLoggedIn() && IndexController::class !== get_class($this)) {
         $this->redirectToRoute('Index', 'Login');
     }
 }
Ejemplo n.º 2
0
 public function __construct(IRequest $request, IResponse $response, TestBo $testBo, IReverseRouter $router)
 {
     parent::__construct($request, $response);
     $this->testBo = $testBo;
     $this->router = $router;
 }