Ejemplo n.º 1
0
 /**
  * Generates an ID for an element. A partial identifier can be provided
  * (used for classes and their idrefs)
  *
  * @param string $prefix Prefix
  * 
  * @return string ID
  */
 protected static function getUID($prefix = null)
 {
     if (is_null($prefix)) {
         return PHP_UML_SimpleUID::getUID();
     } else {
         return md5(self::EXPORTER_NAME . '#' . $prefix);
     }
 }
Ejemplo n.º 2
0
 /**
  * Initialize the structure before use (we just instantiate the top objects in
  * the logical and deployment models)
  * 
  * @param string $modelName Model name
  */
 public function initModel($modelName = 'default')
 {
     $this->packages = new PHP_UML_Metamodel_Package();
     $this->packages->name = $modelName;
     $this->packages->id = PHP_UML_SimpleUID::getUID();
     $this->addInternalPhpTypes();
     $this->deploymentPackages = new PHP_UML_Metamodel_Package();
     $this->deploymentPackages->name = 'Deployment View';
     $this->deploymentPackages->id = PHP_UML_SimpleUID::getUID();
 }
Ejemplo n.º 3
0
 /**
  * Returns a unique ID
  * 
  * @return string
  */
 private static function getUID()
 {
     return PHP_UML_SimpleUID::getUID();
 }