示例#1
0
 function getCallable()
 {
     $callable = function () {
         if ($this->input->getOption('xml')) {
             $this->input->setOption('format', 'xml');
         }
         $helper = new DescriptorHelper();
         $helper->describe($this->output, $this->getApplication(), array('format' => $this->input->getOption('format'), 'raw_text' => $this->input->getOption('raw'), 'namespace' => $this->input->getArgument('namespace')));
     };
     return $callable;
 }
示例#2
0
 /**
  * {@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->describe($output, $this->command, array('format' => $input->getOption('format'), 'raw' => $input->getOption('raw')));
     $this->command = null;
 }