| @@ 86-99 (lines=14) @@ | ||
| 83 | * @param string $id A service id |
|
| 84 | */ |
|
| 85 | private function synchronize($id) { |
|
| 86 | foreach ($this->getDefinitions() as $definitionId => $definition) { |
|
| 87 | // only check initialized services |
|
| 88 | if (!$this->initialized($definitionId)) { |
|
| 89 | continue; |
|
| 90 | } |
|
| 91 | ||
| 92 | foreach ($definition->getMethodCalls() as $call) { |
|
| 93 | foreach ($call[1] as $argument) { |
|
| 94 | if ($argument instanceof Reference && $id == (string) $argument) { |
|
| 95 | $this->callMethod($this->get($definitionId), $call); |
|
| 96 | } |
|
| 97 | } |
|
| 98 | } |
|
| 99 | } |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| @@ 1133-1146 (lines=14) @@ | ||
| 1130 | trigger_error('The '.__METHOD__.' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED); |
|
| 1131 | } |
|
| 1132 | ||
| 1133 | foreach ($this->definitions as $definitionId => $definition) { |
|
| 1134 | // only check initialized services |
|
| 1135 | if (!$this->initialized($definitionId)) { |
|
| 1136 | continue; |
|
| 1137 | } |
|
| 1138 | ||
| 1139 | foreach ($definition->getMethodCalls() as $call) { |
|
| 1140 | foreach ($call[1] as $argument) { |
|
| 1141 | if ($argument instanceof Reference && $id == (string) $argument) { |
|
| 1142 | $this->callMethod($this->get($definitionId), $call); |
|
| 1143 | } |
|
| 1144 | } |
|
| 1145 | } |
|
| 1146 | } |
|
| 1147 | } |
|
| 1148 | ||
| 1149 | private function callMethod($service, $call) |
|