An error occurred while loading the file. Please try again.
-
Guillaume Perréal authoredb8bcadb6
<?php
/*
* © 2016 IRSTEA
* Guillaume Perréal <guillaume.perreal@irstea.fr>
* Tous droits réservés.
*/
namespace Irstea\PlantUmlBundle\Model;
use Irstea\PlantUmlBundle\Writer\WriterInterface;
/**
* Description of RootNamespace
*
* @author Guillaume Perréal <guillaume.perreal@irstea.fr>
*/
class RootNamespace extends AbstractNamespace
{
/**
* @var ArrowInterface[]
*/
private $arrows = [];
public function addArrow(ArrowInterface $arrow)
{
$this->arrows[] = $arrow;
return $this;
}
public function outputTo(WriterInterface $writer)
{
$this
->outputNodesTo($writer)
->outputChildrenTo($writer)
->outputArrowsTo($writer);
return $this;
}
protected function outputArrowsTo(WriterInterface $writer)
{
foreach ($this->arrows as $arrow) {
$arrow->outputTo($writer);
}
return $this;
}
}