private function PhpDumper::addServices in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::addServices()
Adds multiple services.
Return value
string
1 call to PhpDumper::addServices()
- PhpDumper::dump in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php - Dumps the service container as a PHP class.
File
- vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php, line 673
Class
- PhpDumper
- PhpDumper dumps a service container as a PHP class.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function addServices() {
$publicServices = $privateServices = $synchronizers = '';
$definitions = $this->container
->getDefinitions();
ksort($definitions);
foreach ($definitions as $id => $definition) {
if ($definition
->isPublic()) {
$publicServices .= $this
->addService($id, $definition);
}
else {
$privateServices .= $this
->addService($id, $definition);
}
$synchronizers .= $this
->addServiceSynchronizer($id, $definition);
}
return $publicServices . $synchronizers . $privateServices;
}