/** * Execute the parsing process. * * @throws Zend_Console_Getopt_Exception * * @return void */ public function execute() { $files = $this->parseFiles(); if (count($files) < 1) { throw new Zend_Console_Getopt_Exception('No parsable files were found, did you specify any using the -f or -d parameter?'); } $parser = new DocBlox_Parser(); $parser->setTitle(htmlentities($this->getTitle())); if ($this->getVerbose()) { $parser->setLogLevel(DocBlox_Core_Log::DEBUG); } if ($this->getQuiet()) { $parser->setLogLevel(DocBlox_Core_Log::QUIET); } $parser->setExistingXml($this->getTarget() . '/structure.xml'); $parser->setIgnorePatterns($this->getIgnore()); $parser->setExtensions($this->getExtensions()); $parser->setForced($this->getForce()); $parser->setMarkers($this->getMarkers()); $parser->setValidate($this->getValidate()); $parser->setVisibility($this->getVisibility()); $parser->setPath($parser->getCommonPath($files)); // save the generate file to the path given as the 'target' option file_put_contents($this->getTarget() . '/structure.xml', $parser->parseFiles($files)); }