/**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if ($input->getOption('xml')) {
         $input->setOption('format', 'xml');
     }
     $helper = new DescriptorHelper();
     $helper->describe($output, $this->getApplication(), $input->getOption('format'), $input->getOption('raw'));
 }
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if ($input->getOption('xml')) {
         $input->setOption('format', 'xml');
     }
     $helper = new DescriptorHelper();
     $helper->describe($output, $this->getApplication(), array('format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace')));
 }
Example #3
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (null === $this->command) {
         $this->command = $this->getApplication()->find($input->getArgument('command_name'));
     }
     $helper = new DescriptorHelper();
     $helper->describe($output, $this->command, array('format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw')));
     $this->command = null;
 }
Example #4
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if ($input->getOption('xml')) {
         @trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
         $input->setOption('format', 'xml');
     }
     $helper = new DescriptorHelper();
     $helper->describe($output, $this->getApplication(), array('format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace')));
 }
 /**
  * @inheritdoc
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (null === $this->command) {
         $this->command = $this->getApplication()->find($input->getArgument('command_name'));
     }
     $config = new CliConfig();
     $helper = new DescriptorHelper();
     $helper->register('txt', new CustomTextDescriptor($config->get('application.executable')));
     $helper->register('md', new CustomMarkdownDescriptor($config->get('application.executable')));
     $helper->describe($output, $this->command, ['format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw')]);
 }
 /**
  * @inheritdoc
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (null === $this->command) {
         $this->command = $this->getApplication()->find($input->getArgument('command_name'));
     }
     if ($input->getOption('xml')) {
         $input->setOption('format', 'xml');
     }
     $helper = new DescriptorHelper();
     $helper->register('txt', new CustomTextDescriptor());
     $helper->describe($output, $this->command, array('format' => $input->getOption('format'), 'raw' => $input->getOption('raw')));
 }
Example #7
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $output->writeln(" ______             _____  ______   __");
     $output->writeln("|  ____|           |  __ \\|  _ \\ \\ / /");
     $output->writeln("| |__ _ __ ___  ___| |__) | |_) \\ V /");
     $output->writeln("|  __| '__/ _ \\/ _ \\  ___/|  _ < > <");
     $output->writeln("| |  | | |  __/  __/ |    | |_) / . \\");
     $output->writeln("|_|  |_|  \\___|\\___|_|    |____/_/ \\_\\");
     if ($input->getOption('xml')) {
         $input->setOption('format', 'xml');
     }
     $helper = new DescriptorHelper();
     $helper->describe($output, $this->getApplication(), array('format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace')));
 }
Example #8
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $io = new DrupalStyle($input, $output);
     if (null === $this->command) {
         $this->command = $this->getApplication()->find($input->getArgument('command_name'));
     }
     if ($input->getOption('xml')) {
         $io->info($this->trans('commands.help.messages.deprecated'), E_USER_DEPRECATED);
         $input->setOption('format', 'xml');
     }
     $helper = new DescriptorHelper();
     $helper->describe($io, $this->command, array('format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'command_name' => $input->getArgument('command_name')));
     $this->command = null;
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $output->writeln(" _____   ______ _____   ____  __   __");
     $output->writeln("|  __ \\ |  ____|  __ \\ |  _  \\ \\ / /");
     $output->writeln("| |__) || |___ | |__) || |_) | \\ V /");
     $output->writeln("|  _  / |  ___||  ___/ |  _ <   > <");
     $output->writeln("| | \\ \\ | |    | |     | |_) | / . \\");
     $output->writeln("|_|  \\_\\|_|    |_|     |____/ /_/ \\_\\");
     if (null === $this->command) {
         $this->command = $this->getApplication()->find($input->getArgument('command_name'));
     }
     if ($input->getOption('xml')) {
         $input->setOption('format', 'xml');
     }
     $helper = new DescriptorHelper();
     $helper->describe($output, $this->command, array('format' => $input->getOption('format'), 'raw' => $input->getOption('raw')));
     $this->command = null;
 }
 /**
  * Get the usage description, including parameters and options.
  *
  * @return string
  */
 public function getHelpDescription() : string
 {
     $inputDefinition = $this->inputDefinition;
     $output = new BufferedOutput();
     $name = $this->getFullCommand();
     $command = (new Command($name))->setDefinition($inputDefinition)->setDescription($this->getDescription());
     $descriptor = new DescriptorHelper();
     $descriptor->describe($output, $command);
     return $output->fetch();
 }
Example #11
0
 /**
  * {@inheritdoc}
  */
 public function handle(InputInterface $input, OutputInterface $output)
 {
     $helper = new DescriptorHelper();
     $helper->describe($output, $this->getApplication(), array('format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace')));
 }
Example #12
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $helper = new DescriptorHelper();
     $helper->register('txt', new CustomTextDescriptor());
     $helper->describe($output, $this->getApplication(), array('format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace')));
 }
Example #13
0
 /**
  * Show the help for a single generator.
  * @param GeneratorInterface $generator
  * @param OutputInterface    $output
  */
 protected function showGeneratorHelp(GeneratorInterface $generator, OutputInterface $output)
 {
     $definition = new InputDefinition($generator->getDefinition());
     $output->writeln("<comment>Generator:</comment> <info>{$generator->getName()}</info>");
     $output->writeln(" {$generator->getDescription()}");
     $output->writeln("");
     $output->writeln("<comment>Usage:</comment>");
     $output->writeln(" {$this->getName()} {$generator->getName()} {$definition->getSynopsis()}");
     $output->writeln("");
     $descriptor = new DescriptorHelper();
     $descriptor->describe($output, $definition);
 }
Example #14
0
 protected function viewHelp(InputInterface $input, OutputInterface $output)
 {
     $helper = new DescriptorHelper();
     $helper->describe($output, $this, array('raw_text' => false, 'format' => 'txt'));
 }