public function showCommand(int $index)
    {
        $routes = $this->router->getRoutes();
        if (isset($routes[$index - 1])) {
            /** @var Route $route */
            $route = $routes[$index - 1];

            $this->outputLine('<b>Information for route ' . $index . ':</b>');
            $this->outputLine('  Name: ' . $route->getName());
            $this->outputLine('  Pattern: ' . $route->getUriPattern());
            $this->outputLine('  Defaults: ');
            foreach ($route->getDefaults() as $defaultKey => $defaultValue) {
                $this->outputLine('    - ' . $defaultKey . ' => ' . $defaultValue);
            }
            $this->outputLine('  Append: ' . ($route->getAppendExceedingArguments() ? 'true' : 'false'));
        } else {
            $this->outputLine('Route ' . $index . ' was not found!');
        }
    }
public function showCommand(int $index)
    {
        $routes = $this->router->getRoutes();
        if (isset($routes[$index - 1])) {
            /** @var Route $route */
            $route = $routes[$index - 1];

            $this->outputLine('<b>Information for route ' . $index . ':</b>');
            $this->outputLine('  Name: ' . $route->getName());
            $this->outputLine('  Pattern: ' . $route->getUriPattern());
            $this->outputLine('  Defaults: ');
            foreach ($route->getDefaults() as $defaultKey => $defaultValue) {
                $this->outputLine('    - ' . $defaultKey . ' => ' . $defaultValue);
            }
            $this->outputLine('  Append: ' . ($route->getAppendExceedingArguments() ? 'true' : 'false'));
        } else {
            $this->outputLine('Route ' . $index . ' was not found!');
        }
    }
public function showCommand ( int $ index ) { $ routes = $ this -> router -> getRoutes ( ) ; if ( isset ( $ routes [ $ index - 1 ] ) ) { /** @var Route $route */ $ route = $ routes [ $ index - 1 ] ; $ this -> outputLine ( '<b>Information for route ' . $ index . ':</b>' ) ; $ this -> outputLine ( '  Name: ' . $ route -> getName ( ) ) ; $ this -> outputLine ( '  Pattern: ' . $ route -> getUriPattern ( ) ) ; $ this -> outputLine ( '  Defaults: ' ) ; foreach ( $ route -> getDefaults ( ) as $ defaultKey => $ defaultValue ) { $ this -> outputLine ( '    - ' . $ defaultKey . ' => ' . $ defaultValue ) ; } $ this -> outputLine ( '  Append: ' . ( $ route -> getAppendExceedingArguments ( ) ? 'true' : 'false' ) ) ; } else { $ this -> outputLine ( 'Route ' . $ index . ' was not found!' ) ; } }
Show information for a route

This command displays the configuration of a route specified by index number.

@param integer $index The index of the route as given by routing:list
@return void
Show information for a route