com\setasign\SetaFramework\FileSystem
UnsavedFile Class UnsavedFile
File: /SetaFramework/src/FileSystem/UnsavedFile.php
This class represents a file within the memory. The file can but doesn't have to exist in the filesystem.
Class hierarchy
Implements
Summary
Properties
$contentType
protected string UnsavedFile::$contentType
$fileContent
protected string|resource|\Psr\Http\Message\StreamInterface UnsavedFile::$fileContent
$fileName
protected string UnsavedFile::$fileName
Static Methods
createByUploadedFile()
public static UnsavedFile::createByUploadedFile (
\Psr\Http\Message\UploadedFileInterface $uploadedFile,
bool $readStream = false
): UnsavedFilebool $readStream = false
Parameters
- $uploadedFile : \Psr\Http\Message\UploadedFileInterface
- $readStream : bool
If true, the stream of the uploaded file will be read completly (memory intensive).
Exceptions
Methods
__construct()
public UnsavedFile::__construct (
string $fileName,
string $contentType,
string|resource|\Psr\Http\Message\StreamInterface $fileContent
)string $contentType,
string|resource|\Psr\Http\Message\StreamInterface $fileContent
UnsavedFile constructor.
Parameters
- $fileName : string
- $contentType : string
- $fileContent : string|resource|\Psr\Http\Message\StreamInterface
getFileContent()
public UnsavedFile::getFileContent (
void
): string|\Psr\Http\Message\StreamInterface|resource|FilePathwithFileName()
Returns a new instance of the file with another file name.
Parameters
- $newFileName : string
