public function __construct() { SecurityController::securityStart(); $this->parameters = []; $this->routes = Routes::getRoutes(); $this->message = new Message(); $this->user = SecurityController::user(); }
private function isDisabled($path) { $path_conf = explode('/', $path); $routes = Routes::getRoutes(); $disabledSecurityPaths = array('auth', 'logout'); foreach ($disabledSecurityPaths as $keyPath) { if (isset($routes[$keyPath]) && isset($path_conf[1]) && !empty($path_conf[1])) { if (stristr($routes[$keyPath], $path_conf[1])) { return true; } } } return false; }