Get the route

@return \stdClass
187621
protected function getRoute()
    {
        $route = $this->getRequest()->getAttribute('route');
        
        if (!isset($route)) {
            throw new \LogicException("Route has not been set");
        }
        
        if (is_array($route)) {
            $route = (object)$route;
        }
        
        if (!$route instanceof \stdClass) {
            $type = (is_object($route) ? get_class($route) . ' ' : '') . gettype($route);
            throw new \UnexpectedValueException("Expected route to be a stdClass object, not a $type");
        }
        
        return $route;
    }
565468
public function getRoute()
    {
        /** @var Http $req */
        $req = $this->context->getRequest();
        if (isset($this->map[$req->getControllerName()])) {
            return $this->map[$req->getControllerName()];
        }

        return $this->map[Generic::CONTROLLER_KEY];
    }
26413
public static function getCurrentRoute()
    {
        if (!static::$currentRoute) {
            $uri = Grav::instance()['uri'];
            static::$currentRoute = RouteFactory::createFromParts($uri->toArray());
        }

        return static::$currentRoute;
    }
1138582
public function getListRoute()
    {
        if (null === $this->listRoute) {
            $route = rtrim($this->getBaseRoute(), '/') . '/' . $this->getListSuffix();
            $this->setListRoute($route);
        }

        return $this->listRoute;
    }
413467
public function getUri()
    {
        if ($this->routeGenerated) {
            return $this->routeGenerated;
        }

        if ($this->routeName !== null) {
            return $this->routeGenerated = $this->urlGenerator->generate($this->routeName, $this->routeParams);
        }

        if (strpos($this->uri, '/') === 0 || !$this->parent) {
            return $this->routeGenerated = $this->uri;
        }

        $parentUri = $this->parent ? $this->parent->getUri() : null;
        if ($parentUri === null) {
            return $this->routeGenerated = $this->uri;
        }

        $routeGenerated = new Uri($parentUri);
        $routeGenerated = $routeGenerated->withPath($routeGenerated->getPath() . '/' . $this->uri);

        return $this->routeGenerated = (string) $routeGenerated;
    }
237487
public function findRoute()
    {
        $pathinfo = !empty($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '/' ? $_SERVER['PATH_INFO'] : '/index/index';
        $items    = $pathinfo ? explode('/', ltrim($pathinfo, '/')) : [];
        $count    = count($items);

        foreach ($this->routes as $value) {
            if ($count === $value['count'] && !is_null($value['action'])
                && ($value['method'] === 'ALL' || $_SERVER['REQUEST_METHOD'] === $value['method'])
            ) {
                // match full uri
                if ($pathinfo === '/' . implode('/', $value['params'])) {
                    return [strtolower(substr($value['controller'], strrpos($value['controller'], '\\') + 1, -10)), $value['action'], $value['controller']];
                }

                // match RESTful uri
                $f = false;
                $url_args = [];
                foreach ($items as $k => $v) {
                    $slug = $value['params'][$k];

                    $origin_key_pos = strpos($slug, '(');
                    if ($origin_key_pos !== false) {
                        // match :id(\d+)
                        $preg = substr($slug, $origin_key_pos + 1, -1);
                        if (preg_match('/^' . $preg . '$/', $v) > 0) {
                            $f = true;
                            $slug = substr($slug, 1, $origin_key_pos - 1);
                            $url_args[$slug] = $v;
                            continue;
                        }
                    } elseif (substr($slug, 0, 1) === ':') {
                        // match :id
                        $f = true;
                        $slug = substr($slug, 1);
                        $url_args[$slug] = $v;
                        continue;
                    }
                }

                // Match uri success
                if ($f) {
                    if (count($url_args) > 0) {
                        $_GET = array_merge($_GET, $url_args);
                    }

                    return [strtolower(substr($value['controller'], strrpos($value['controller'], '\\') + 1, -10)), $value['action'], $value['controller']];
                }
            } elseif (is_null($value['action'])) {
                // match auto route
                $controller_name = strtolower(substr($value['controller'], strrpos($value['controller'], '\\') + 1, -10));

                if ($value['count'] === 0 && $items[0] === $controller_name) {
                    // has not prefixUri
                    return [$controller_name, isset($items[1])?$items[1]:'index', $value['controller']];
                } elseif ($value['count'] > 0) {
                    // has prefixUri
                    $prefix = '/' . implode('/', $value['params']);
                    // check has same prefix uri
                    if (substr($pathinfo, 0, strlen($prefix)) === $prefix) {
                        $items = $pathinfo ? explode('/', substr($pathinfo, strlen($prefix)+1)) : [];
                        // not contains prefix uri, and it must match controller name
                        if ($items[0] === $controller_name) {
                            return [$controller_name, empty($items[1])?'index':$items[1], $value['controller']];
                        }
                    }
                }
            }
        }

        return [];
    }
866373
public function getRoute() {
        if (is_null($this->route)) {
            $this->route = Yii::$app->request->getHostInfo() . '/' . Yii::$app->request->getPathInfo();
        }
        return $this->route;
    }
1156248
public function indexUrl()
    {
        $route = 'admin::edit-page';
        if (Route::has($route)) {
            return route($route, $this->page_id);
        }

        return route('dashboard');
    }
50213
public function getCurrentRoute()
    {
        if (isset($this->currentRoute)) {
            return $this->currentRoute;
        } elseif (! $this->hasDispatchedRoutes() || ! $route = $this->container['request']->route()) {
            return;
        }

        // We need to recompile the route, adding the where clause (for pattern restrictions) and check again.
        if ($route instanceof IlluminateRoute) {
            $route->compiled = false;
            $this->addWhereClausesToRoute($route);

            // If the matching fails, it would be due to a parameter format validation check fail.
            if (! $route->matches($this->container['request'])) {
                throw new NotFoundHttpException('Not Found!');
            }
        }

        return $this->currentRoute = $this->createRoute($route);
    }
630807
protected function getRoutes()
    {
        $routes = [];
        foreach ($this->routes as $collection) {
            foreach ($collection->getRoutes() as $route) {
                $uses = array_key_exists('uses', $route->getAction())
                    ? $route->getAction()['uses']
                    : $route->getActionName();

                $routes[] = $this->filterRoute([
                    'host' => $route->domain(),
                    'method' => implode('|', $route->methods()),
                    'uri' => $route->uri(),
                    'name' => $route->getName(),
                    'action' => $uses,
                    'middleware' => $route->getMiddleware() ? implode(", ", $route->getMiddleware()) : "No",
                    'protected' => $route->isProtected() ? 'Yes' : 'No',
                    'versions' => implode(', ', $route->versions()),
                    'scopes' => implode(', ', $route->scopes()),
                    'rate' => $this->routeRateLimit($route),
                ]);
            }
        }

        if ($sort = $this->option('sort')) {
            $routes = Arr::sort($routes, function ($value) use ($sort) {
                return $value[$sort];
            });
        }
        if ($this->option('short')) {
            $this->headers = ['Method', 'URI', 'Name', 'Version(s)'];
            $routes = array_map(function ($item) {
                return array_only($item, ['method', 'uri', 'name', 'versions']);
            }, $routes);
        }
        return array_filter(array_unique($routes, SORT_REGULAR));
    }
974926
protected function getObjectRouteFromPath()
    {
        if ($this->objectRoute === null) {
            $this->objectRoute = $this->loadObjectRouteFromPath();
        }

        return $this->objectRoute;
    }
1102743
public function getNavigation()
    {
        if (self::$_oNaviTree == null) {
            self::$_oNaviTree = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\NavigationTree::class);
        }

        return self::$_oNaviTree;
    }
756774
public function getCachedRoutesPath()
    {
        if ($this->initialized && env('CACHE_ROUTES_FILE')) {
            $this->cacheFile($this->basePath.'/bootstrap/cache/routes.php', $this->routesPath);
            return $this->routesPath;
        }

        return false;
    }
309658
public function getCurrentRoute()
    {
        if (isset($this->currentRoute)) {
            return $this->currentRoute;
        } elseif (! $this->hasDispatchedRoutes()) {
            return null;
        }

        $request = $this->container['request'];

        return $this->currentRoute = $this->createRoute($request->route());
    }
1220952
public function getControllerClass()
    {
        $controller = array_get($this->routeParams, 'controller');
        $match      = null;
        if (!preg_match('/(.*?)(?=@|$)/', $controller, $match)) {
            return;
        }
        return $match[0];
    }
1335213
protected function getRouter()
    {
        return isset($this->laravel->router) ? $this->laravel->router : $this->laravel;
    }
605401
public function getPathInfo()
    {
        $route = $this->languageInPath ? Str::sub(parent::getPathInfo(), Str::length($this->language) + 1) : parent::getPathInfo();
        if (!Str::startsWith('/', $route)) {
            $route = '/' . $route;
        }
        return $route;
    }