Retourne le contenu généré pour le fichier de routes.

@return string
760614
protected function getRoutesContent()
    {
        if (!$stub = $this->getRoutesStub()) {
            return '';
        }

        return strtr($stub, array_merge($this->getCommonReplacements(), [
            '{{baseUrl}}'    => implode('/', $this->sectionSegments),
            '{{controller}}' => implode('\\', $this->sectionSegmentsStudly).'Controller',
        ]));
    }
268775
public function getRoutes()
    {
        if ($this->config['app']['debug']) {
            $html = '<pre>';
            $result = array();
            foreach ($this->modules as $module) {
                $list = $module->getControllersUrlRoutes();
                $result = array_merge($list, $result);
            }
            $html .= implode("\n", $result);
            $html .= '</pre>';
            return $html;
        }
        return "";
    }
1071982
protected function getRoutes()
    {
        if (0 === count($this->routes)) {
            return $this->router->getRouteCollection()->all();
        }

        $routes = [];
        foreach ($this->routes as $name) {
            $route = $this->router->getRouteCollection()->get($name);
            if (null !== $route) {
                $routes[$name] = $route;
            }
        }

        return $routes;
    }
1209174
public function getContents()
    {
        $callback = $this->detach();
        $result = '';
        if (is_callable($callback)) {
            $result = $callback();
        }
        if (!is_string($result)) {
            return '';
        }

        return $result;
    }
1098064
public function mapFrontendRoutes()
    {
        $directory = base_path('routes');
        if(is_dir($directory)) {
            $routeFiles = File::files($directory);

            $excludeRoutes = ['base.php', 'api.php'];

            Route::group(
                [
                'middleware' => $this->middleware['frontend'],
                ], function () use ($routeFiles, $excludeRoutes) {
                    foreach ($routeFiles as $file) {
                        // Base.php is loaded from FrontendBaseRoutes method
                        if (!in_array($file->getFilename(), $excludeRoutes)) {
                            include $file;
                        }
                    }
                }
            );
        }
        return $this;
    }
689237
public function getRouteCollection()
    {
        if (null === $this->routeCollection) {
            $this->routeCollection = $this
                ->routeDocumentCollectionToRouteCollectionTransformer
                ->transform($this->routeDocumentRepository->findAll());
        }

        return $this->routeCollection;
    }
801682
protected function getPathToContent()
    {
        # Reverse the path so we can use the last "content" directory in the
        # path as the actual content directory. This is in case the content
        # folder has a parent folder also called content somewhere down the tree.
        $reverseContentPath = $this->getReverseContentPath();
        $contentPathParts = array_reverse(explode(DIRECTORY_SEPARATOR, $reverseContentPath));
        $pathToContent = trim(implode(DIRECTORY_SEPARATOR, $contentPathParts), DIRECTORY_SEPARATOR);

        return DIRECTORY_SEPARATOR.$pathToContent.DIRECTORY_SEPARATOR.'content'.DIRECTORY_SEPARATOR;
    }
801339
public function getCreateRoute()
    {
        if (null === $this->createRoute) {
            $route = rtrim($this->getBaseRoute(), '/') . '/' . $this->getCreateSuffix();
            $this->setCreateRoute($route);
        }

        return $this->createRoute;
    }
1369162
public function getRouteCollection()
    {
        if (is_null($this->routeCollection)) {
            $this->routeCollection = new RouteCollection();
            $this->initRoutes();
        }

        return $this->routeCollection;
    }
866373
public function getRoute() {
        if (is_null($this->route)) {
            $this->route = Yii::$app->request->getHostInfo() . '/' . Yii::$app->request->getPathInfo();
        }
        return $this->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));
    }
114674
private function getRoute()
    {
        $route = $this->route;
        $first = substr($route, 0, 1);
        $last = substr($route, -1);
        if($first == "/") {
            $route = substr($route, 1);
        }
        if($last == "/") {
            $route = substr($route, 0, -1);
        }
        $this->resource = $route;
        
    }
542883
public function createTableOfContent()
    {
        $basepath   = $this->config['basepath'];
        $pattern    = $this->config['pattern'];
        $route      = $this->di->request->getRoute();

        // if dir, add index if file exists.
        // partly for adding doc/index to work
        // partly to make doc/ generate proper toc.
        $baseroute  = dirname($route);
        $path       = $basepath . '/' . $baseroute . '/' . $pattern;

        $toc = [];
        foreach (glob($path) as $file) {
            $parts    = pathinfo($file);
            $filename = $parts['filename'];

            $title = $this->getTitleFromFirstLine($file);
            $file2route = substr($filename, strpos($filename, '_') + 1);

            $url = $baseroute . '/' . $file2route;
            /*
            if ($file2route == 'index' ) {
                $url = $baseroute;
            }*/

            // Create level depending on the file id
            $id = substr($filename, 0, strpos($filename, '_'));
            $level = 2;
            if ($id % 100 === 0) {
                $level = 0;
            } elseif ($id % 10 === 0) {
                $level = 1;
            }

            $toc[$url] = [
                'title'     => $title,
                'filename'  => $parts['basename'],
                'level'     => $level,
            ];
        }

        return $toc;
    }
567631
protected function getPathFromContent()
    {
        $pathFromContent = str_replace($this->getPathToContent(), '', $this->getFile()->getRealPath());

        return trim($pathFromContent, DIRECTORY_SEPARATOR);
    }
35618
public function regenerateUrls()
    {
        $router = Router::getInstance();
        try {
            $router->hydrateRouting();
            $router->simpatize();
            Security::getInstance()->setFlash("callback_message", t("Rutas generadas correctamente"));
            Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-routes", true));
        } catch (\Exception $e) {
            Logger::log($e->getMessage(), LOG_ERR);
            Security::getInstance()->setFlash("callback_message", t("Algo no ha salido bien, revisa los logs"));
            Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-routes", true));
        }
        return $this->redirect('admin-routes');
    }
1348607
public function baseRoute()
    {
        if ($this->baseRoute === null) {
            $this->baseRoute = $this->baseUrl();
        }

        $link   = $this->baseRoute;
        $locale = $this->lang();
        if ($locale !== null) {
            $translator = $this->translator();
            $origLocale = $translator->getLocale();
            $translator->setLocale($this->lang());
            $link = $this->renderTemplate((string)$link);
            $translator->setLocale($origLocale);
        }

        return rtrim((string)$link, '/').'/';
    }
505743
public function contents() {
        $contents = $this->filesystem()->listContents($this->path());
        $returns = array();
        foreach ($contents as $content) {
            $returns[] = $this->flightcontrol->get($content["path"]);
        }
        return $returns;
    }