You are here

public function FileBag::set in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/FileBag.php \Symfony\Component\HttpFoundation\FileBag::set()

Sets a parameter by name.

Parameters

string $key The key:

mixed $value The value:

Overrides ParameterBag::set

1 call to FileBag::set()
FileBag::add in vendor/symfony/http-foundation/FileBag.php
Adds parameters.

File

vendor/symfony/http-foundation/FileBag.php, line 48

Class

FileBag
FileBag is a container for uploaded files.

Namespace

Symfony\Component\HttpFoundation

Code

public function set($key, $value) {
  if (!is_array($value) && !$value instanceof UploadedFile) {
    throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.');
  }
  parent::set($key, $this
    ->convertFileInformation($value));
}