This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/FoundationBundle/Command/RouterApacheDumperCommand.php

52 lines
1.3 KiB
PHP
Raw Normal View History

<?php
namespace Symfony\Bundle\FoundationBundle\Command;
use Symfony\Components\Console\Input\InputArgument;
use Symfony\Components\Console\Input\InputOption;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;
use Symfony\Components\Console\Output\Output;
use Symfony\Components\Routing\Matcher\Dumper\ApacheMatcherDumper;
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
/**
* RouterApacheDumperCommand.
*
* @package Symfony
* @subpackage Framework_FoundationBundle
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
*/
class RouterApacheDumperCommand extends Command
{
/**
* @see Command
*/
protected function configure()
{
$this
->setName('router:dump-apache')
;
}
/**
* @see Command
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
2010-06-27 17:28:29 +01:00
$router = $this->container->get('router');
$dumper = new ApacheMatcherDumper($router->getRouteCollection());
$output->writeln($dumper->dump(), Output::OUTPUT_RAW);
}
}