You are here

private function DiactorosFactory::createUploadedFile 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::createUploadedFile()

Creates a PSR-7 UploadedFile instance from a Symfony one.

Parameters

UploadedFile $symfonyUploadedFile:

Return value

UploadedFileInterface

1 call to DiactorosFactory::createUploadedFile()
DiactorosFactory::getFiles in vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php
Converts Symfony uploaded files array to the PSR one.

File

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

Class

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

Namespace

Symfony\Bridge\PsrHttpMessage\Factory

Code

private function createUploadedFile(UploadedFile $symfonyUploadedFile) {
  return new DiactorosUploadedFile($symfonyUploadedFile
    ->getRealPath(), $symfonyUploadedFile
    ->getSize(), $symfonyUploadedFile
    ->getError(), $symfonyUploadedFile
    ->getClientOriginalName(), $symfonyUploadedFile
    ->getClientMimeType());
}