コード例 #1
0
ファイル: UmlApiTest.php プロジェクト: liujingyu/phpuml
 /**
  * Tests the various calls to the API made from scripts/phpuml
  * 
  */
 public function testPhpUmlScript()
 {
     $output = self::TEMP_DIR . 'new_phpumlscript.xmi';
     $version = 1;
     $modelName = 'Foo';
     $encoding = 'iso-8859-1';
     $errorLevel = 1;
     $uml = new PHP_UML();
     $uml->setInput(self::SUITE_DIR . 'test1.php');
     $uml->deploymentView = true;
     $uml->componentView = true;
     $uml->dollar = true;
     $uml->docblocks = true;
     $uml->onlyApi = false;
     $uml->showInternal = true;
     $uml->pureObject = false;
     $uml->setMatchPatterns('*.php');
     $uml->setIgnorePatterns('.svn');
     PHP_UML_Warning::clear();
     $uml->parse('test');
     $e = PHP_UML_Output_Exporter::getInstance('xmi');
     $uml->setExporter($e);
     if ($e instanceof PHP_UML_Output_Xmi_Exporter) {
         $e->setEncoding($encoding);
         $e->setXmiVersion($version);
     }
     if ($e instanceof PHP_UML_Output_Xmi_Exporter) {
         $e->generateXmi();
         echo $e->getXmiDocument()->dump();
     }
     $e->export($output);
     foreach (PHP_UML_Warning::$stack as $msg) {
         echo $msg . "\n";
     }
     $this->assertTrue(file_exists($output));
 }
コード例 #2
0
ファイル: UML.php プロジェクト: altesien/FinalProject
 /**
  * Set the exporter to use (an Output_Xmi_Exporter is already set by default)
  *
  * @param PHP_UML_Output_Exporter $exporter The exporter object to use
  */
 public function setExporter(PHP_UML_Output_Exporter $exporter)
 {
     $this->exporter = $exporter;
     $this->exporter->setModel($this->model);
 }
コード例 #3
0
ファイル: ExporterXSL.php プロジェクト: altesien/FinalProject
 public function __construct()
 {
     parent::__construct();
     $this->saveToFileCallback = __CLASS__ . '::saveToFile';
     $this->createFolderCallback = __CLASS__ . '::createFolder';
 }