setName('generate') ->setDescription('Generate documentation') ->addOption('configuration', 'c', InputArgument::OPTIONAL, 'Configuration file') ->addOption('format', 'f', InputArgument::OPTIONAL, 'Output format, html or confluence', 'html') ->addOption('processor', 'p', InputArgument::OPTIONAL, 'Manipulations on the tree', 'none') ->addOption('destination', 'd', InputArgument::OPTIONAL, $description, 'static'); } protected function execute(InputInterface $input, OutputInterface $output) { $daux = new Daux(Daux::STATIC_MODE); $daux->initialize($input->getOption('configuration')); $width = $this->getApplication()->getTerminalDimensions()[0]; switch(strtolower($input->getOption('processor'))) { case 'none': default: //nothing } switch(strtolower($input->getOption('format'))) { case 'confluence': (new ConfluenceGenerator())->generate($daux, $output, $width); break; case 'html': default: (new HTMLGenerator())->generate($daux, $input->getOption('destination'), $output, $width); } } }