You are here

public function ServerRequest::withUploadedFiles in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-diactoros/src/ServerRequest.php \Zend\Diactoros\ServerRequest::withUploadedFiles()
  2. 8.0 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\ServerRequest::withUploadedFiles()
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-diactoros/src/ServerRequest.php \Zend\Diactoros\ServerRequest::withUploadedFiles()

Create a new instance with the specified uploaded files.

This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated body parameters.

Parameters

array An array tree of UploadedFileInterface instances.:

Return value

self

Throws

\InvalidArgumentException if an invalid structure is provided.

Overrides ServerRequestInterface::withUploadedFiles

File

vendor/zendframework/zend-diactoros/src/ServerRequest.php, line 109

Class

ServerRequest
Server-side HTTP request

Namespace

Zend\Diactoros

Code

public function withUploadedFiles(array $uploadedFiles) {
  $this
    ->validateUploadedFiles($uploadedFiles);
  $new = clone $this;
  $new->uploadedFiles = $uploadedFiles;
  return $new;
}