function InputBag::set
Sets an input by name.
Parameters
string|int|float|bool|array|null $value:
Overrides ParameterBag::set
1 call to InputBag::set()
- InputBag::add in vendor/
symfony/ http-foundation/ InputBag.php - Adds input values.
File
-
vendor/
symfony/ http-foundation/ InputBag.php, line 68
Class
- InputBag
- InputBag is a container for user input values such as $_GET, $_POST, $_REQUEST, and $_COOKIE.
Namespace
Symfony\Component\HttpFoundationCode
public function set(string $key, mixed $value) : void {
if (null !== $value && !\is_scalar($value) && !\is_array($value) && !$value instanceof \Stringable) {
throw new \InvalidArgumentException(\sprintf('Expected a scalar, or an array as a 2nd argument to "%s()", "%s" given.', __METHOD__, get_debug_type($value)));
}
$this->parameters[$key] = $value;
}