FileUpload
class FileUpload extends Object
Provides access to individual files that have been uploaded by a client.
Properties
string read-only | $name | ||
string read-only | $sanitizedName | ||
string|null read-only | $contentType | ||
int read-only | $size | ||
string read-only | $temporaryFile | ||
int read-only | $error | ||
bool read-only | $ok | ||
string|null read-only | $contents |
Methods
No description
Returns the file name.
Returns the sanitized file name.
Returns the MIME content type of an uploaded file.
Returns the size of an uploaded file.
Returns the path to an uploaded file.
Returns the path to an uploaded file.
Returns the error code. http://php.net/manual/en/features.file-upload.errors.php
Is there any error?
Move uploaded file to new location.
Is uploaded file GIF, PNG or JPEG?
Returns the image.
Returns the dimensions of an uploaded image as array.
Get file contents.
Details
at line 43
__construct($value)
No description
at line 62
string
getName()
Returns the file name.
at line 72
string
getSanitizedName()
Returns the sanitized file name.
at line 82
string|null
getContentType()
Returns the MIME content type of an uploaded file.
at line 95
int
getSize()
Returns the size of an uploaded file.
at line 105
string
getTemporaryFile()
Returns the path to an uploaded file.
at line 115
string
__toString()
Returns the path to an uploaded file.
at line 125
int
getError()
Returns the error code. http://php.net/manual/en/features.file-upload.errors.php
at line 135
bool
isOk()
Is there any error?
at line 146
FileUpload
move($dest)
Move uploaded file to new location.
at line 163
bool
isImage()
Is uploaded file GIF, PNG or JPEG?
at line 174
Image
toImage()
Returns the image.
at line 184
array|null
getImageSize()
Returns the dimensions of an uploaded image as array.
at line 194
string|null
getContents()
Get file contents.