Zend\Diactoros\ServerRequestFactory::normalizeNestedFileSpec PHP Method

normalizeNestedFileSpec() private static method

Loops through all nested files and returns a normalized array of UploadedFileInterface instances.
private static normalizeNestedFileSpec ( array $files = [] ) : Psr\Http\Message\UploadedFileInterface[]
$files array
return Psr\Http\Message\UploadedFileInterface[]
    private static function normalizeNestedFileSpec(array $files = [])
    {
        $normalizedFiles = [];
        foreach (array_keys($files['tmp_name']) as $key) {
            $spec = ['tmp_name' => $files['tmp_name'][$key], 'size' => $files['size'][$key], 'error' => $files['error'][$key], 'name' => $files['name'][$key], 'type' => $files['type'][$key]];
            $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
        }
        return $normalizedFiles;
    }