public function __construct($container) { parent::__construct($container); if ($this->session->get('email') === FALSE && $this->route->action != 'signup' && $this->route->action != 'register') { $this->redirect('login'); exit; } }
public function __construct($container) { parent::__construct($container); if ($this->session->get('email') === FALSE) { $this->redirect('login'); exit; } }
/** * [__construct description] * @param [object] $container [Instance of Pimple] * * Often, an individual controller will need a constructor. * Below is an example of creating the __construct() for a * given controller. * The $app variable must be passed to the construct method, * and again to the parent::__construct() method call */ public function __construct($app) { parent::__construct($app); }