Exemple #1
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;
 }
Exemple #2
0
 /**
  */
 public function next()
 {
     $this->dir_iterator->next();
     if ($this->dir_iterator->valid()) {
         $this->current = Dev_Source::Module($this->module_name($this->dir_iterator->current()->path));
     } else {
         return null;
     }
 }
Exemple #3
0
 /**
  * @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;
 }
Exemple #4
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;
 }