RootNamespace.php 1.17 KiB
<?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;