Failed to fetch fork details. Try again later.
-
Delaigue Olivier authored9bb1b039
Forked from
HYCAR-Hydro / airGR
Source project has a limited visibility.
<?php declare(strict_types=1);
/*
* Copyright (C) 2016-2018 IRSTEA
* All rights reserved.
*/
namespace Irstea\PlantUmlBundle\Model\Namespace_\Php;
use Irstea\PlantUmlBundle\Model\ArrowInterface;
use Irstea\PlantUmlBundle\Writer\WriterInterface;
/**
* Description of RootNamespace.
*/
class RootNamespace extends AbstractNamespace
{
public const CONF_TYPE = 'php';
/**
* @var ArrowInterface[]
*/
private $arrows = [];
public function addArrow(ArrowInterface $arrow)
{
$this->arrows[] = $arrow;
return $this;
}
public function writeTo(WriterInterface $writer)
{
$writer->write("set namespaceSeparator .\n");
$this
->writeNodesTo($writer)
->writeChildrenTo($writer)
->writeArrowsTo($writer);
return $this;
}
protected function writeArrowsTo(WriterInterface $writer)
{
foreach ($this->arrows as $arrow) {
$arrow->writeTo($writer);
}
return $this;
}
protected function getNamespacePrefix()
{
return '';
}
public function getNodeLabel($className)
{
return $className;
}
}