protected function convertUploadedFiles(array $files)
    {
        $fileObjects = [];
        
        foreach ($files as $fieldName => $file) {
            if ($file instanceof UploadedFileInterface) {
                $fileObjects[$fieldName] = $file;
            } elseif (!isset($file['tmp_name']) && !isset($file['error'])) {
                $fileObjects[$fieldName] = $this->convertUploadedFiles($file);
            } else {
                $fileObjects[$fieldName] = new UploadedFile($file);
            }
        }
        
        return $fileObjects;
    }
protected function convertUploadedFiles(array $files)
    {
        $fileObjects = [];
        
        foreach ($files as $fieldName => $file) {
            if ($file instanceof UploadedFileInterface) {
                $fileObjects[$fieldName] = $file;
            } elseif (!isset($file['tmp_name']) && !isset($file['error'])) {
                $fileObjects[$fieldName] = $this->convertUploadedFiles($file);
            } else {
                $fileObjects[$fieldName] = new UploadedFile($file);
            }
        }
        
        return $fileObjects;
    }
protected function convertUploadedFiles ( array $ files ) { $ fileObjects = [ ] ; foreach ( $ files as $ fieldName => $ file ) { if ( $ file instanceof UploadedFileInterface ) { $ fileObjects [ $ fieldName ] = $ file ; } elseif ( ! isset ( $ file [ 'tmp_name' ] ) && ! isset ( $ file [ 'error' ] ) ) { $ fileObjects [ $ fieldName ] = $ this -> convertUploadedFiles ( $ file ) ; } else { $ fileObjects [ $ fieldName ] = new UploadedFile ( $ file ) ; } } return $ fileObjects ; }
Convert a list of uploaded files to a Jasny PSR-7 uploaded files

@param array $files
@return UploadedFile[]|array
Convert a list of uploaded files to a Jasny PSR - 7 uploaded files