public function Definition::getArgument in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Definition.php \Symfony\Component\DependencyInjection\Definition::getArgument()
Gets an argument to pass to the service constructor/factory method.
@api
Parameters
int $index:
Return value
mixed The argument value
Throws
OutOfBoundsException When the argument does not exist
1 method overrides Definition::getArgument()
- DefinitionDecorator::getArgument in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ DefinitionDecorator.php - Gets an argument to pass to the service constructor/factory method.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Definition.php, line 366
Class
- Definition
- Definition represents a service definition.
Namespace
Symfony\Component\DependencyInjectionCode
public function getArgument($index) {
if ($index < 0 || $index > count($this->arguments) - 1) {
throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, count($this->arguments) - 1));
}
return $this->arguments[$index];
}