private function ContainerBuilder::synchronize in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::synchronize()
Synchronizes a service change.
This method updates all services that depend on the given service by calling all methods referencing it.
Parameters
string $id A service id:
Deprecated
since version 2.7, will be removed in 3.0.
1 call to ContainerBuilder::synchronize()
- ContainerBuilder::set in vendor/
symfony/ dependency-injection/ ContainerBuilder.php - Sets a service.
File
- vendor/
symfony/ dependency-injection/ ContainerBuilder.php, line 1059
Class
- ContainerBuilder
- ContainerBuilder is a DI container that provides an API to easily describe services.
Namespace
Symfony\Component\DependencyInjectionCode
private function synchronize($id) {
if ('request' !== $id) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED);
}
foreach ($this->definitions as $definitionId => $definition) {
// only check initialized services
if (!$this
->initialized($definitionId)) {
continue;
}
foreach ($definition
->getMethodCalls() as $call) {
foreach ($call[1] as $argument) {
if ($argument instanceof Reference && $id == (string) $argument) {
$this
->callMethod($this
->get($definitionId), $call);
}
}
}
}
}