mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-04 04:37:46 +08:00
Merge pull request #1394 from huangzhhui/master
Change the command the desc
This commit is contained in:
commit
bf0a707101
@ -30,7 +30,6 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
|||||||
*/
|
*/
|
||||||
class InfoRouteCommand extends SymfonyCommand
|
class InfoRouteCommand extends SymfonyCommand
|
||||||
{
|
{
|
||||||
protected $routes = [BASE_PATH . '/config/routes.php'];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ContainerInterface
|
* @var ContainerInterface
|
||||||
@ -44,15 +43,15 @@ class InfoRouteCommand extends SymfonyCommand
|
|||||||
|
|
||||||
public function __construct(ContainerInterface $container, ConfigInterface $config)
|
public function __construct(ContainerInterface $container, ConfigInterface $config)
|
||||||
{
|
{
|
||||||
parent::__construct('info:routes');
|
parent::__construct('describe:routes');
|
||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
$this->setDescription('Get routes [{path}] to get the route info.')
|
$this->setDescription('Describe the routes information.')
|
||||||
->addOption('path', 'p', InputOption::VALUE_OPTIONAL, 'Detail of single route');
|
->addOption('path', 'p', InputOption::VALUE_OPTIONAL, 'Get the detail of the specified route information by path');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output)
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
@ -99,7 +98,7 @@ class InfoRouteCommand extends SymfonyCommand
|
|||||||
$io->success('success.');
|
$io->success('success.');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function show($data, $output)
|
private function show(array $data, OutputInterface $output)
|
||||||
{
|
{
|
||||||
$rows = [];
|
$rows = [];
|
||||||
foreach ($data as $route) {
|
foreach ($data as $route) {
|
||||||
|
Loading…
Reference in New Issue
Block a user