/** * @param array $argv * * @return int */ public function run(array $argv) { Core::with($this->config->output ? IO_FS::File($this->config->output)->open('w+') : IO::stdout())->write(Dev_Source::Library($argv)->xml->SaveXML()); return 0; }
/** * @param array $argv * * @return int */ public function run(array $argv) { try { $xslt = new XSLTProcessor(); $xslt->importStylesheet(DOMDocument::loadXML(Dev_Source_Diagram_XSL::class_diagram())); $result = $xslt->transformToXML(Dev_Source::Library($argv)->xml); } catch (Dev_Source_InvalidSourceException $e) { $this->dump_errors($e); return -1; } $this->config->dump ? IO::stdout()->write($result) : $this->output($result); return 0; }
/** * @param array $argv * * @return int */ public function run(array $argv) { $runner = new Dev_Source_Check_Runner(); $checker = new Dev_Source_Check_GroupChecker(new Dev_Source_Check_NamesChecker(), new Dev_Source_Check_NoEndCharsChecker(), new Dev_Source_Check_NoTabChecker(), new Dev_Source_Check_VersionChecker(), new Dev_Source_Check_ValidXMLCommentChecker()); $result = new Dev_Source_Check_Result(); $runner->run(isset($this->config->library) ? Dev_Source::LibraryDirIterator($this->config->library) : Dev_Source::Library($argv), $checker, $result); $this->output($result); return 0; }