Exemplo n.º 1
0
 /**
  * @param $Path
  *
  * @return string
  * @throws \Exception
  */
 public static function fetchRoute($Path)
 {
     $Path = trim($Path, '/');
     if (in_array($Path, self::$Router->getRouteList())) {
         return self::$Router->getRoute($Path);
     } else {
         return self::$Router->getRoute('Platform/Assistance/Error/Authorization');
     }
 }
Exemplo n.º 2
0
 /**
  * @param $Path
  *
  * @return string
  * @throws \Exception
  */
 public static function fetchRoute($Path)
 {
     $Path = trim($Path, '/');
     if (in_array($Path, self::$Router->getRouteList())) {
         return self::$Router->getRoute($Path);
     } else {
         if (Account::useService()->getAccountBySession()) {
             return self::$Router->getRoute('Platform/Assistance/Error/Authorization');
         } else {
             return self::$Router->getRoute('Platform/Gatekeeper/Authentication');
         }
     }
 }