You are here

private function DiactorosFactory::getFiles in Zircon Profile 8

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

Converts Symfony uploaded files array to the PSR one.

Parameters

array $uploadedFiles:

Return value

array

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

File

vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php, line 84

Class

DiactorosFactory
Builds Psr\HttpMessage instances using the Zend Diactoros implementation.

Namespace

Symfony\Bridge\PsrHttpMessage\Factory

Code

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