public function setArgument($argumentName, $value)
{
if (!is_string($argumentName) || strlen($argumentName) === 0) {
throw new Exception\InvalidArgumentNameException('Invalid argument name (must be a non-empty string).', 1210858767);
}
if (substr($argumentName, 0, 2) === '__') {
$this->internalArguments[$argumentName] = $value;
return;
}
if (is_object($value)) {
throw new Exception\InvalidArgumentTypeException('You are not allowed to store objects in the request arguments. Please convert the object of type "' . get_class($value) . '" given for argument "' . $argumentName . '" to a simple type first.', 1302783022);
}
if (substr($argumentName, 0, 2) === '--') {
$this->pluginArguments[substr($argumentName, 2)] = $value;
return;
}
switch ($argumentName) {
case '@package':
$this->setControllerPackageKey($value);
break;
case '@subpackage':
$this->setControllerSubpackageKey($value);
break;
case '@controller':
$this->setControllerName($value);
break;
case '@action':
$this->setControllerActionName($value);
break;
case '@format':
$this->setFormat($value);
break;
default:
$this->arguments[$argumentName] = $value;
}
}