示例#1
0
 /**
  * Convert the UML model (stored in the object) into some output data.
  * 
  * @param string $format    Desired format ("xmi", "html", "php"...)
  * @param string $outputDir Output directory
  */
 public function export($format = 'xmi', $outputDir = '.')
 {
     if (empty($outputDir)) {
         throw new PHP_UML_Exception('No output folder given.');
     }
     if (empty($this->model) || empty($this->model->packages)) {
         throw new PHP_UML_Exception('No model given.');
     }
     $this->exporter = PHP_UML_Output_Exporter::getInstance($format);
     $this->exporter->setModel($this->model);
     return $this->exporter->export($outputDir);
 }