Give information about the scanned annotations related to route definition.

@return array
764851
public function getRouteDefinitionsDetail()
    {
        $paths = array();
        foreach ($this->getEndpointsInClasses($this->getReader()) as $endpoint) {
            /* @var \Collective\Annotations\Routing\Annotations\MethodEndpoint $endpoint */
            foreach ($endpoint->toRouteDefinitionDetail() as $path) {
                $paths[] = $path;
            }
        }

        return $paths;
    }
1147629
public function getRouteDefinitions()
    {
        $output = '';

        foreach ($this->getEndpointsInClasses($this->getReader()) as $endpoint) {
            $output .= $endpoint->toRouteDefinition().PHP_EOL.PHP_EOL;
        }

        return trim($output);
    }
1338671
public function getRouteParts()
    {
        if (!isset($this->_routeParts) && isset($this->route)) {
            $this->_routeParts = explode('/', ltrim($this->route, '/'));
            if ($this->_routeParts[count($this->_routeParts)-1] === 'index') {
                array_pop($this->_routeParts);
            }
        }
        if (!isset($this->_routeParts)) {
            return [];
        }

        return $this->_routeParts;
    }
1361681
private function getRoutes(): array
    {
        $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(realpath($this->packagePath('Routes'))));

        return array_keys(array_filter(iterator_to_array($iterator), function (SplFileInfo $file) {
            return $file->isFile() && substr($file->getFilename(), 0, strlen('routes.')) === (string)'routes.';
        }));
    }
153000
protected function getRoutesFromPresenters()
    {
        // Assume no routes
        $routes = [];

        $directoryIterator = new RecursiveDirectoryIterator(DOOZR_APP_ROOT.'App/Presenter');
        $iteratorIterator  = new RecursiveIteratorIterator($directoryIterator);
        $regexIterator     = new RegexIterator($iteratorIterator, '/.*\.php/i', RecursiveRegexIterator::GET_MATCH);

        // Iterate over result
        foreach ($regexIterator as $file) {
            // Found a ".php" file in presenter folder ... try to extract routes
            $routesByMethod = self::parseRoutesFromFile($file[0]);

            foreach ($routesByMethod as $method => $routesForMethod) {
                if (isset($routes[$method]) === false) {
                    $routes[$method] = [];
                }

                foreach ($routesForMethod as $route => $object) {
                    $routesForMethod[$route] = $this->objectToObject($object);
                }

                $routes[$method] = array_merge($routes[$method], $routesForMethod);
            }
        }

        // Return routes found ...
        return $routes;
    }
91258
private function getAnnotations()
    {
        $tokens = array();

        while (null !== $this->lexer->lookahead) {

            // start at the @ symbol
            if (DocLexer::T_AT !== $this->lexer->lookahead['type']) {
                $this->lexer->moveNext();

                continue;
            }

            // something about being preceded by a non-catchable pattern
            $position = $this->lexer->token['position']
                + strlen($this->lexer->token['value']);

            if ((null !== $this->lexer->token)
                && ($this->lexer->lookahead['position'] === $position)) {
                $this->lexer->moveNext();

                continue;
            }

            // make sure we get a valid annotation name
            if ((null === ($glimpse = $this->lexer->glimpse()))
                || ((DocLexer::T_NAMESPACE_SEPARATOR !== $glimpse['type'])
                    && !in_array($glimpse['type'], self::$classIdentifiers))) {
                $this->lexer->moveNext();

                continue;
            }

            // find them all and merge them to the list
            if (null !== ($token = $this->getAnnotation())) {
                $tokens = array_merge($tokens, $token);
            }
        }

        return $tokens;
    }
1265968
protected function getSchemaRoutes(Route $route)
    {
        $path = $route->getPath();

        $describedService = substr(substr($path, 7), 0, substr($path, -5) == '/item' ? -7 : -10);

        $tags = array_merge(['Schema'], $this->getPathTags($route, 2));

        return [
            $path,
            'get',
            [
                'produces' => [
                    'application/json',
                ],
                'responses' => [
                    200 => [
                        'description' => 'JSON-Schema for ' . $describedService . '.',
                        'schema' => ['$ref' => '#/definitions/SchemaModel'],
                    ]
                ],
                'tags' => $tags,
                'summary' => 'Get schema information for ' . $describedService . ' endpoints.',
            ]
        ];
    }
509248
protected function getRouteInformation(Route $route)
    {
        if ($route->getName()) {
            return [
                'uri'    => $route->uri(),
                'name'   => $route->getName(),
                'before' => $this->getBeforeFilters($route),
            ];
        }

        return null;
    }
20973
protected function getRouteDefinitions()
    {
        $scanner = $this->laravel->make('annotations.model.scanner');

        $scanner->setClassesToScan($this->provider->modelScans());

        return '<?php '.PHP_EOL.PHP_EOL.$scanner->getModelDefinitions().PHP_EOL;
    }
141985
public function toRouteDefinitionDetail()
    {
        $routes = [];

        foreach ($this->paths as $path) {
            $routes[] = [
                'verb' => $path->verb,
                'path' => $path->path,
                'uses' => $this->uses,
                'as' => $path->as,
                'middleware' => array_merge($this->getClassMiddlewareForPath($path)->all(), $path->middleware, $this->middleware),
                'where' => $path->where,
                'domain' => $path->domain,
            ];
        }

        return $routes;
    }
182813
public function getRequestSegments()
    {
        if (empty($this->requestSegments)) {
            $segments[] = $this->getParameter();

            if ( ! in_array($this->getRequestMethod(), ['index', 'route'])) {
                array_push($segments, $this->getRequestMethod());
            }

            $this->setRequestSegments($segments);
        }

        return $this->requestSegments;
    }
620010
private function getParameters()
    {
        $routeParameters = $this->request->attributes->get('_route_params');
        $parameters = $this->request->query->all();

        if ($routeParameters) {
            $parameters = array_merge($routeParameters, $parameters);
        }

        return $parameters;
    }
907684
protected function generateRoutingData(): array
	{
		$parsedRoutes = [];
		$parser = new FR\RouteParser\Std();
		$dispatcherDataGenerator = new FR\DataGenerator\GroupCountBased();
		foreach ($this->routes as $routeName => $route)
		{
			$parsedRoute = $parser->parse($route->getPath());
			foreach ($route->getAllowedMethods() ?? ['*'] as $httpMethod)
			{
				foreach ($parsedRoute as $segments)
				{
					$dispatcherDataGenerator->addRoute($httpMethod, $segments, $routeName);
				}
			}
			$parsedRoutes[$routeName] = $parsedRoute;
		}
		return [$dispatcherDataGenerator->getData(), $parsedRoutes];
	}
1222050
protected function getRouteInformation($route)
    {
        if (!is_a($route, 'Illuminate\Routing\Route')) {
            return [];
        }
        $uri = head($route->methods()) . ' ' . $route->uri();
        $action = $route->getAction();

        $result = [
           'uri' => $uri ?: '-',
        ];

        $result = array_merge($result, $action);


        if (isset($action['controller']) && strpos($action['controller'], '@') !== false) {
            list($controller, $method) = explode('@', $action['controller']);
            if(class_exists($controller) && method_exists($controller, $method)) {
                $reflector = new \ReflectionMethod($controller, $method);
            }
            unset($result['uses']);
        } elseif (isset($action['uses']) && $action['uses'] instanceof \Closure) {
            $reflector = new \ReflectionFunction($action['uses']);
            $result['uses'] = $result['uses'];
        }

        if (isset($reflector)) {
            $filename = ltrim(str_replace(base_path(), '', $reflector->getFileName()), '/');
            $result['file'] = $filename . ':' . $reflector->getStartLine() . '-' . $reflector->getEndLine();
        }

        return $result;
    }
515085
private function parserCmdAndDesc(): array
    {
        $commands = [];
        $collector = CommandCollector::getCollector();

        /* @var \Swoft\Console\Router\HandlerMapping $route */
        $route = App::getBean('commandRoute');

        foreach ($collector as $className => $command) {
            if (!$command['enabled']) {
                continue;
            }

            $rc = new \ReflectionClass($className);
            $docComment = $rc->getDocComment();
            $docAry = DocBlockHelper::getTags($docComment);

            $prefix = $command['name'];
            $prefix = $route->getPrefix($prefix, $className);
            $commands[$prefix] = StringHelper::ucfirst($docAry['Description']);
        }

        // sort commands
        ksort($commands);

        return $commands;
    }
4540
public function getDirectives()
    {
        return [
            'lang' => [$this, 'translate'],
            'translate' => [$this, 'translate'],
            'sprintf' => [$this, 'sprintf'],
            'plural' => [$this, 'plural'],
            'choice' => [$this, 'plural'],
            'messages' => [$this, 'messages'],
            'widget' => [$this, 'widget'],
            'route' => [$this, 'route'],
            'formToken' => [$this, 'formToken'],

            // Authorisation
            'auth' => [$this, 'auth'],
            'can' => [$this, 'auth'],
            'cannot' => [$this, 'cannot'],
            'endcan' => [$this, 'endauth'],
            'endcannot' => [$this, 'endauth'],
            'endauth' => [$this, 'endauth'],

            // Asset
            'css' => [$this, 'css'],
            'js' => [$this, 'js'],
            'assetTemplate' => [$this, 'assetTemplate'],
            'endTemplate' => [$this, 'endTemplate'],
            'attr' => [$this, 'attr'],

            // Debug
            'shown' => [$this, 'shown'],
            'dd' => [$this, 'dd'],
            'ds' => [$this, 'ds'],
            'die' => [$this, 'dead'],
            'debug' => [$this, 'debug'],
            'enddebug' => [$this, 'endauth'],
        ];
    }
1301044
public function getAnnotations()
    {
        $result = array();
        foreach ($this->annotationsDefinitions as $annotationDefinition) {
            $result = array_merge($result, $this->buildAnnotationsInstances($annotationDefinition));
        }

        return $result;
    }