Checks if a service id has a reference
string $id:
array $arguments:
Boolean
private function hasReference($id, array $arguments) {
foreach ($arguments as $argument) {
if (is_array($argument)) {
if ($this
->hasReference($id, $argument)) {
return true;
}
}
elseif ($argument instanceof Reference) {
if ($id === (string) $argument) {
return true;
}
}
}
return false;
}