/** * Initialize the command and determine which path to take * * @param InputInterface $input * @param OutputInterface $output * @internal param $ Symfony\Component\Console\Input\InputInterface * @internal param $ Symfony\Component\Console\Output\OutputInterface * @return void */ protected function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); switch ($this->input->getArgument('key')) { case 'folder': $this->newFolder(); break; case 'site': $this->newSite(); break; case 'database': $this->newDatabase(); break; case 'variable': $this->newVariable(); break; case 'list': $this->listKeys(); break; default: $helpCommand = $this->getApplication()->find('config:new'); $input = new ArrayInput(['key' => 'list', '--file' => $input->getOption('file')]); $helpCommand->run($input, $output); break; } }
/** * Configure command * * @return void */ protected function configure() { parent::configure(); $this->setName('config'); $this->setDescription('Shows available config commands.'); }
/** * Initialize the command * * @param InputInterface $input * @param OutputInterface $output * @internal param $ Symfony\Component\Console\Input\InputInterface * @internal param $ Symfony\Component\Console\Output\OutputInterface * @return void */ protected function execute(InputInterface $input, OutputInterface $output) { parent::execute($input, $output); $this->outputRawConfig(); }