public function FileBag::set

@api

Overrides ParameterBag::set

1 call to FileBag::set()
FileBag::add in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php
@api

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php, line 56

Class

FileBag
FileBag is a container for HTTP headers.

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