private function GraphvizDumper::cloneContainer in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php \Symfony\Component\DependencyInjection\Dumper\GraphvizDumper::cloneContainer()
1 call to GraphvizDumper::cloneContainer()
- GraphvizDumper::findNodes in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ GraphvizDumper.php - Finds all nodes.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ GraphvizDumper.php, line 196
Class
- GraphvizDumper
- GraphvizDumper dumps a service container as a graphviz file.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function cloneContainer() {
$parameterBag = new ParameterBag($this->container
->getParameterBag()
->all());
$container = new ContainerBuilder($parameterBag);
$container
->setDefinitions($this->container
->getDefinitions());
$container
->setAliases($this->container
->getAliases());
$container
->setResources($this->container
->getResources());
foreach ($this->container
->getScopes() as $scope => $parentScope) {
$container
->addScope(new Scope($scope, $parentScope));
}
foreach ($this->container
->getExtensions() as $extension) {
$container
->registerExtension($extension);
}
return $container;
}