You are here

private function HttpFoundationFactory::getFiles in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php \Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory::getFiles()

Converts to the input array to $_FILES structure.

Parameters

array $uploadedFiles:

Return value

array

1 call to HttpFoundationFactory::getFiles()
HttpFoundationFactory::createRequest in vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php
Creates a Symfony Request instance from a PSR-7 one.

File

vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php, line 59

Class

HttpFoundationFactory
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Bridge\PsrHttpMessage\Factory

Code

private function getFiles(array $uploadedFiles) {
  $files = array();
  foreach ($uploadedFiles as $key => $value) {
    if ($value instanceof UploadedFileInterface) {
      $files[$key] = $this
        ->createUploadedFile($value);
    }
    else {
      $files[$key] = $this
        ->getFiles($value);
    }
  }
  return $files;
}