* Tous droits réservés. */ namespace Irstea\PlantUmlBundle\Model\Decorator; use Irstea\PlantUmlBundle\Model\Arrow\ExtendsClass; use Irstea\PlantUmlBundle\Model\ClassVisitor; use Irstea\PlantUmlBundle\Model\ClassVisitorInterface; use Irstea\PlantUmlBundle\Model\DecoratorInterface; use Irstea\PlantUmlBundle\Model\NodeInterface; use ReflectionClass; /** * Description of InheritanceDecorator * * @author Guillaume Perréal */ class InheritanceDecorator extends AbstractRelationDecorator { public function decorate(ReflectionClass $class, NodeInterface $node, ClassVisitorInterface $visitor) { $parent = $class->getParentClass(); if ($parent) { $this->visitRelations($node, [$parent->getName()], $visitor); } } protected function buildRelation(NodeInterface $source, NodeInterface $target) { return new ExtendsClass($source, $target); } }