File
- Full name:
\Qubus\Http\Input\File
- This class implements:
\Qubus\Http\Input\Item
Properties
index
name
filename
size
type
errors
tmpName
Methods
__construct
Parameters:
Parameter | Type | Description |
---|---|---|
$index | string|int |
createFromArray
Create from array
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$values | array |
Throws:
getIndex
setIndex
Set input index
Parameters:
Parameter | Type | Description |
---|---|---|
$index | string |
getSize
setSize
Set file size
Parameters:
Parameter | Type | Description |
---|---|---|
$size | int |
getMime
Get mime-type of file
getType
setType
Set type
Parameters:
Parameter | Type | Description |
---|---|---|
$type | string |
getExtension
Returns extension without "."
getName
Get human friendly name
setName
Set human friendly name.
Useful for adding validation etc.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
setFilename
Set filename
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
getFilename
Get filename
Return Value:
mixed
move
Move the uploaded temporary file to it's new home
Parameters:
Parameter | Type | Description |
---|---|---|
$destination | string |
getContents
Get file contents
hasError
Return true if an upload error occurred.
getError
Get upload-error code.
setError
Set error
Parameters:
Parameter | Type | Description |
---|---|---|
$error | ?int |
getTmpName
setTmpName
Set file temp. name
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
__toString
getValue
setValue
Parameters:
Parameter | Type | Description |
---|---|---|
$value | string |
toArray
Automatically generated on 2025-10-13