private function XmlDumper::addServices in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Dumper/XmlDumper.php \Symfony\Component\DependencyInjection\Dumper\XmlDumper::addServices()
Adds services.
Parameters
\DOMElement $parent:
1 call to XmlDumper::addServices()
- XmlDumper::dump in vendor/
symfony/ dependency-injection/ Dumper/ XmlDumper.php - Dumps the service container as an XML string.
File
- vendor/
symfony/ dependency-injection/ Dumper/ XmlDumper.php, line 235
Class
- XmlDumper
- XmlDumper dumps a service container as an XML string.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function addServices(\DOMElement $parent) {
$definitions = $this->container
->getDefinitions();
if (!$definitions) {
return;
}
$services = $this->document
->createElement('services');
foreach ($definitions as $id => $definition) {
$this
->addService($definition, $id, $services);
}
$aliases = $this->container
->getAliases();
foreach ($aliases as $alias => $id) {
while (isset($aliases[(string) $id])) {
$id = $aliases[(string) $id];
}
$this
->addServiceAlias($alias, $id, $services);
}
$parent
->appendChild($services);
}