Commit 8f0fa199 authored by Guillaume Perréal's avatar Guillaume Perréal

Les namespaces n'étant pas stateless, il faut les instancier pour chaque graphe.

parent 839cbfc4
......@@ -90,7 +90,7 @@ class GraphDefinitionBuilder
protected function doBuild()
{
list($source, $sourceFilter) = $this->buildSources();
$layoutFilter = $this->filterBuilder->build($this->config['layout']) ?: $sourceFilter;
$decorator = $this->buildFilteredDecorator();
$namespace = $this->buildNamespace();
......@@ -199,7 +199,7 @@ class GraphDefinitionBuilder
protected function buildNamespace()
{
$type = $this->config['layout']['namespaces'];
if ($type === "entities") {
return $this->setDefinitionDecorator(
"namespace.$type",
......@@ -208,7 +208,10 @@ class GraphDefinitionBuilder
);
}
return new Reference("irstea.plant_uml.namespaces.$type");
return $this->setDefinitionDecorator(
"namespace.$type",
"irstea.plant_uml.namespaces.$type.template",
);
}
/**
......
......@@ -54,15 +54,21 @@ services:
abstract: true
public: false
irstea.plant_uml.namespaces.php:
irstea.plant_uml.namespaces.php.template:
class: Irstea\PlantUmlBundle\Model\Namespace_\Php\RootNamespace
abstract: true
public: false
irstea.plant_uml.namespaces.flat:
irstea.plant_uml.namespaces.flat.template:
class: Irstea\PlantUmlBundle\Model\Namespace_\FlatNamespace
abstract: true
public: false
irstea.plant_uml.namespaces.bundles:
irstea.plant_uml.namespaces.bundles.template:
class: Irstea\PlantUmlBundle\Model\Namespace_\BundleNamespace
arguments: ["%kernel.bundles%"]
abstract: true
public: false
irstea.plant_uml.namespaces.entities.template:
class: Irstea\PlantUmlBundle\Doctrine\DoctrineNamespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment