Synchronizes a service change.
This method updates all services that depend on the given service by calling all methods referencing it.
string $id A service id:
private function synchronize($id) {
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);
}
}
}
}
}