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

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

No related merge requests found
Showing with 15 additions and 6 deletions
+15 -6
...@@ -90,7 +90,7 @@ class GraphDefinitionBuilder ...@@ -90,7 +90,7 @@ class GraphDefinitionBuilder
protected function doBuild() protected function doBuild()
{ {
list($source, $sourceFilter) = $this->buildSources(); list($source, $sourceFilter) = $this->buildSources();
$layoutFilter = $this->filterBuilder->build($this->config['layout']) ?: $sourceFilter; $layoutFilter = $this->filterBuilder->build($this->config['layout']) ?: $sourceFilter;
$decorator = $this->buildFilteredDecorator(); $decorator = $this->buildFilteredDecorator();
$namespace = $this->buildNamespace(); $namespace = $this->buildNamespace();
...@@ -199,7 +199,7 @@ class GraphDefinitionBuilder ...@@ -199,7 +199,7 @@ class GraphDefinitionBuilder
protected function buildNamespace() protected function buildNamespace()
{ {
$type = $this->config['layout']['namespaces']; $type = $this->config['layout']['namespaces'];
if ($type === "entities") { if ($type === "entities") {
return $this->setDefinitionDecorator( return $this->setDefinitionDecorator(
"namespace.$type", "namespace.$type",
...@@ -208,7 +208,10 @@ class GraphDefinitionBuilder ...@@ -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: ...@@ -54,15 +54,21 @@ services:
abstract: true abstract: true
public: false public: false
irstea.plant_uml.namespaces.php: irstea.plant_uml.namespaces.php.template:
class: Irstea\PlantUmlBundle\Model\Namespace_\Php\RootNamespace 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 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 class: Irstea\PlantUmlBundle\Model\Namespace_\BundleNamespace
arguments: ["%kernel.bundles%"] arguments: ["%kernel.bundles%"]
abstract: true
public: false
irstea.plant_uml.namespaces.entities.template: irstea.plant_uml.namespaces.entities.template:
class: Irstea\PlantUmlBundle\Doctrine\DoctrineNamespace class: Irstea\PlantUmlBundle\Doctrine\DoctrineNamespace
......
Supports Markdown
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