public static function createUploadedFile(
        $file,
        int $size = null,
        int $error = \UPLOAD_ERR_OK,
        string $clientFilename = null,
        string $clientMediaType = null
    ): UploadedFileInterface {
        return new UploadedFile($file, $clientFilename, $clientMediaType, $size, $error);
    }
public static function createUploadedFile(
        $file,
        int $size = null,
        int $error = \UPLOAD_ERR_OK,
        string $clientFilename = null,
        string $clientMediaType = null
    ): UploadedFileInterface {
        return new UploadedFile($file, $clientFilename, $clientMediaType, $size, $error);
    }
public static function createUploadedFile ( $ file , int $ size = null , int $ error = \ UPLOAD_ERR_OK , string $ clientFilename = null , string $ clientMediaType = null ) : UploadedFileInterface { return new UploadedFile ( $ file , $ clientFilename , $ clientMediaType , $ size , $ error ) ; }
Create a new uploaded file.
If a string is used to create the file, a temporary resource will be
created with the content of the string.
If a size is not provided it will be determined by checking the size of
the file.
@see http://php.net/manual/features.file-upload.post-method.php
@see http://php.net/manual/features.file-upload.errors.php
@param string|resource $file
@param integer         $size in bytes
@param integer         $error PHP file upload error
@param string          $clientFilename
@param string          $clientMediaType
@return UploadedFileInterface
@throws \InvalidArgumentException If the file resource is not readable.
Create a new uploaded file . If a string is used to create the file a temporary resource will be created with the content of the string . If a size is not provided it will be determined by checking the size of the file .