private function GraphvizDumper::cloneContainer in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php \Symfony\Component\DependencyInjection\Dumper\GraphvizDumper::cloneContainer()
1 call to GraphvizDumper::cloneContainer()
- GraphvizDumper::findNodes in vendor/
symfony/ dependency-injection/ Dumper/ GraphvizDumper.php - Finds all nodes.
File
- vendor/
symfony/ dependency-injection/ Dumper/ GraphvizDumper.php, line 200
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;
}