Ejemplo n.º 1
0
 /**
  * Transform the parent
  *
  * @param \Puml\Model\Object $child  The direct child of the parent
  *
  * @return void
  * @since 0.1
  * @throws Exception
  */
 protected function transformParent(\Puml\Model\Object $child)
 {
     if (!$child->hasParent()) {
         throw new \Exception('Unable to transform parent, when no parent available, on class ' . $child->getName());
     }
     $this->level++;
     $parent = $child->getParent();
     $this->transformObject($parent);
     $edge = new Edge($this->graph->findNode($child->getName()), $this->graph->findNode($parent->getName()));
     $edge->setArrowhead('empty');
     $this->graph->link($edge);
     if ($parent->hasParent()) {
         $this->transformParent($parent);
     }
 }