/** * @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'); } }
/** * @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'); } } }