private function PhpDumper::addServices in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::addServices()
Adds multiple services.
Return value
string
1 call to PhpDumper::addServices()
- PhpDumper::dump in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ PhpDumper.php - Dumps the service container as a PHP class.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ 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;
}