Class UploadedFile
Represents Uploaded Files.
It manages and normalizes uploaded files according to the PSR-7 standard.
- Slim\Http\UploadedFile implements Psr\Http\Message\UploadedFileInterface
Namespace: Slim\Http
Link: https://github.com/php-fig/http-message/blob/master/src/UploadedFileInterface.php
Link: https://github.com/php-fig/http-message/blob/master/src/StreamInterface.php
Located at Http/UploadedFile.php
Link: https://github.com/php-fig/http-message/blob/master/src/UploadedFileInterface.php
Link: https://github.com/php-fig/http-message/blob/master/src/StreamInterface.php
Located at Http/UploadedFile.php
Methods summary
public static
array|null
|
#
createFromEnvironment(
Create a normalized tree of UploadedFile instances from the Environment. |
public
|
#
__construct( string $file, string|null $name = null, string|null $type = null, integer|null $size = null, integer $error = UPLOAD_ERR_OK, boolean $sapi = false )
Construct a new UploadedFile instance. |
public
Psr\Http\Message\StreamInterface
|
|
public
|
|
public
integer
|
|
public
string|null
|
|
public
string|null
|
|
public
integer|null
|
Properties summary
public
string
|
$file
The client-provided full path to the file |
|
protected
string
|
$name
The client-provided file name. |
|
protected
string
|
$type
The client-provided media type of the file. |
|
protected
integer
|
$size
The size of the file in bytes. |
|
protected
integer
|
$error
A valid PHP UPLOAD_ERR_xxx code for the file upload. |
#
UPLOAD_ERR_OK
|
protected
boolean
|
$sapi
Indicates if the upload is from a SAPI environment. |
#
false
|
protected
Psr\Http\Message\StreamInterface
|
$stream
An optional StreamInterface wrapping the file resource. |
|
protected
boolean
|
$moved
Indicates if the uploaded file has already been moved. |
#
false
|