コード例 #1
0
 public function __construct()
 {
     SecurityController::securityStart();
     $this->parameters = [];
     $this->routes = Routes::getRoutes();
     $this->message = new Message();
     $this->user = SecurityController::user();
 }
コード例 #2
0
 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;
 }