FileUpload
class FileUpload
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?
No description
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 45
__construct($value)
No description
at line 64
string
getName()
Returns the file name.
at line 74
string
getSanitizedName()
Returns the sanitized file name.
at line 84
string|null
getContentType()
Returns the MIME content type of an uploaded file.
at line 97
int
getSize()
Returns the size of an uploaded file.
at line 107
string
getTemporaryFile()
Returns the path to an uploaded file.
at line 117
string
__toString()
Returns the path to an uploaded file.
at line 127
int
getError()
Returns the error code. http://php.net/manual/en/features.file-upload.errors.php
at line 137
bool
isOk()
Is there any error?
at line 146
bool
hasFile()
No description
at line 157
FileUpload
move($dest)
Move uploaded file to new location.
at line 179
bool
isImage()
Is uploaded file GIF, PNG or JPEG?
at line 190
Image
toImage()
Returns the image.
at line 200
array|null
getImageSize()
Returns the dimensions of an uploaded image as array.
at line 210
string|null
getContents()
Get file contents.