Validates an array of References.
array $arguments An array of Reference objects:
RuntimeException when there is a reference to an abstract definition.
private function validateReferences(array $arguments) {
foreach ($arguments as $argument) {
if (is_array($argument)) {
$this
->validateReferences($argument);
}
elseif ($argument instanceof Reference) {
$targetDefinition = $this
->getDefinition((string) $argument);
if (null !== $targetDefinition && $targetDefinition
->isAbstract()) {
throw new RuntimeException(sprintf('The definition "%s" has a reference to an abstract definition "%s". ' . 'Abstract definitions cannot be the target of references.', $this->currentId, $argument));
}
$this
->validateScope($argument, $targetDefinition);
}
}
}