public function Definition::getArgument

Gets an argument to pass to the service constructor/factory method.

@api

Parameters

integer $index:

Return value

mixed The argument value

1 method overrides Definition::getArgument()
DefinitionDecorator::getArgument in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/DefinitionDecorator.php
Gets an argument to pass to the service constructor/factory method.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Definition.php, line 278

Class

Definition
Definition represents a service definition.

Namespace

Symfony\Component\DependencyInjection

Code

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];
}