* Tous droits réservés. */ namespace Irstea\PlantUmlBundle\Model\Namespace_; use Irstea\PlantUmlBundle\Model\ArrowInterface; use Irstea\PlantUmlBundle\Writer\WriterInterface; /** * Description of RootNamespace * * @author Guillaume Perréal */ class FlatNamespace extends AbstractNamespace { /** * @var ArrowInterface[] */ private $arrows = []; public function addArrow(ArrowInterface $arrow) { $this->arrows[] = $arrow; return $this; } public function outputTo(WriterInterface $writer) { $writer->write("set namespaceSeparator none\n"); $this ->outputNodesTo($writer) ->outputArrowsTo($writer); return $this; } protected function outputArrowsTo(WriterInterface $writer) { foreach ($this->arrows as $arrow) { $arrow->outputTo($writer); } return $this; } public function getNamespace($namespaceName) { return $this; } public function getShortName($name) { return $name; } }