classes/Console/RouteListCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
	{
		$table = new Table($output);
		$table->setHeaders(['Name', 'Methods', 'Path', 'Controller', 'Hooks']);

		$router = $this->app->getContainer()
			->resolve('Autarky\Routing\Router');

		/** @var \Autarky\Routing\Route $route */
		foreach ($router->getRoutes() as $route) {
			$methods = implode('|', $route->getMethods());
			$controller = $route->getController();

			if (is_array($controller)) {
				$controller = implode('::', $controller);
			} else if ($controller instanceof \Closure) {
				$controller = 'Closure';
			}

			$hooks = '';
			if ($before = $route->getBeforeHooks()) {
				$hooks .= 'Before: ' . implode(', ', $before);
			}
			if ($after = $route->getAfterHooks()) {
				if ($hooks !== '') {
					$hooks .= ' - ';
				}
				$hooks .= 'After: ' . implode(', ', $after);
			}

			$table->addRow([$route->getName(), $methods, $route->getPattern(), $controller, $hooks]);
		}

		$table->render();

		return 0;
	}
protected function execute(InputInterface $input, OutputInterface $output)
	{
		$table = new Table($output);
		$table->setHeaders(['Name', 'Methods', 'Path', 'Controller', 'Hooks']);

		$router = $this->app->getContainer()
			->resolve('Autarky\Routing\Router');

		/** @var \Autarky\Routing\Route $route */
		foreach ($router->getRoutes() as $route) {
			$methods = implode('|', $route->getMethods());
			$controller = $route->getController();

			if (is_array($controller)) {
				$controller = implode('::', $controller);
			} else if ($controller instanceof \Closure) {
				$controller = 'Closure';
			}

			$hooks = '';
			if ($before = $route->getBeforeHooks()) {
				$hooks .= 'Before: ' . implode(', ', $before);
			}
			if ($after = $route->getAfterHooks()) {
				if ($hooks !== '') {
					$hooks .= ' - ';
				}
				$hooks .= 'After: ' . implode(', ', $after);
			}

			$table->addRow([$route->getName(), $methods, $route->getPattern(), $controller, $hooks]);
		}

		$table->render();

		return 0;
	}
{@inheritdoc}