function Definition::getArgument
Gets an argument to pass to the service constructor/factory method.
Throws
OutOfBoundsException When the argument does not exist
2 calls to Definition::getArgument()
- ChildDefinition::getArgument in vendor/
symfony/ dependency-injection/ ChildDefinition.php - Gets an argument to pass to the service constructor/factory method.
- ChildDefinition::getArgument in vendor/
symfony/ dependency-injection/ ChildDefinition.php - Gets an argument to pass to the service constructor/factory method.
1 method overrides Definition::getArgument()
- ChildDefinition::getArgument in vendor/
symfony/ dependency-injection/ ChildDefinition.php - Gets an argument to pass to the service constructor/factory method.
File
-
vendor/
symfony/ dependency-injection/ Definition.php, line 292
Class
- Definition
- Definition represents a service definition.
Namespace
Symfony\Component\DependencyInjectionCode
public function getArgument(int|string $index) : mixed {
if (!\array_key_exists($index, $this->arguments)) {
throw new OutOfBoundsException(\sprintf('The argument "%s" doesn\'t exist in class "%s".', $index, $this->class));
}
return $this->arguments[$index];
}