Sets a specific argument
@api
integer $index:
mixed $argument:
Definition The current instance
OutOfBoundsException When the replaced argument does not exist
public function replaceArgument($index, $argument) {
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));
}
$this->arguments[$index] = $argument;
return $this;
}