Class Env_File
Extended value that represents an uploaded file.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Value implements Core\Comparable, Core\Equality, Core\Identity
- Core\Env_File
Package: Core\Env
Since: 3.1
Requires: PHP 5.3, Fileinfo
Version: 1.0
Located at Env.inc.php
Methods summary
public
|
|
public
The
|
|
public
string
|
#
detectedMIMEType( )
Tries to detected the file MIME type regardless of the browser-supplied value. |
protected
mixed|string
|
|
public
array
|
|
public
integer
|
#
errorCode( )
Returns the error code of the file upload. An error code of 0 indicates
success. If the error code is 0 but |
public
string
|
|
public
string
|
|
public
string
|
|
public
boolean
|
|
public
boolean
|
#
multipleFiles( )
Helper method to distinguish between multiple and single file uploads. Upon accessing the environment this method should be called on the returned object to test whether a single file has been uploaded and the object can be treated as such, or multiple files has been uploaded and the returned object is an iterator for all uploaded files. |
public
string
|
|
public
integer
|
|
public
boolean
|
|
public
boolean
|
Methods inherited from Core\Value
__clone()
,
__invoke()
,
__toString()
,
bit()
,
bool()
,
compareTo()
,
explode()
,
filter()
,
float()
,
int()
,
isArray()
,
isBoolean()
,
isCallable()
,
isCallback()
,
isEqualTo()
,
isFloat()
,
isIdenticalTo()
,
isInteger()
,
isNull()
,
isNumeric()
,
isObject()
,
isOffset()
,
isResource()
,
isScalar()
,
isString()
,
set()
,
string()
,
stringObject()
,
toArray()
,
toLower()
,
toUpper()
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
attachMethod()
,
chain()
,
getValueForKey()
,
getValueForKeyPath()
,
getValueForUndefinedKey()
,
hash()
,
issetValueForKey()
,
setValueForKey()
,
setValueForKeyPath()
,
setValueForUndefinedKey()
,
uuid()
Constants summary
integer |
SuccessStatus
Success error code, file upload completed successfully. |
#
\UPLOAD_ERR_OK
|
integer |
SizeLimitExceededStatus
The uploaded file exceeds the |
#
\UPLOAD_ERR_INI_SIZE
|
integer |
FormLimitExceededStatus
The uploaded file exceeds the |
#
\UPLOAD_ERR_FORM_SIZE
|
integer |
PartialStatus
The uploaded file was only partially uploaded. |
#
\UPLOAD_ERR_PARTIAL
|
integer |
NoFileStatus
No file was uploaded. |
#
\UPLOAD_ERR_NO_FILE
|
integer |
NoTemporaryDirectoryStatus
Missing a temporary folder. |
#
\UPLOAD_ERR_NO_TMP_DIR
|
integer |
WriteErrorStatus
Failed to write file to disk. |
#
\UPLOAD_ERR_CANT_WRITE
|
integer |
DeniedStatus
A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help. |
#
\UPLOAD_ERR_EXTENSION
|
Constants inherited from Core\Value
Bit
,
Boolean
,
Float
,
Integer
,
LowercaseString
,
String
,
StringObject
,
UppercaseString
Constants inherited from Core\Object
AnyParameterType
,
AutochainParameterType
,
AutocreateParameterType
,
BooleanParameterType
,
CharParameterType
,
EnumParameterType
,
IntegerParameterType
,
RealParameterType
,
StringParameterType
,
UserParameterType
Properties summary
protected
mixed
|
$_v_index
The current index for a multiple files upload, |
|
protected
string
|
$_v_key
The |
Properties inherited from Core\Value
Magic properties
public read-only
string
|
$clientFilename
Original filename given by the client. |
public read-only
array
|
$data
Array with all data fields available for the uploaded file. |
public read-only
string
|
$detectedMIMEType
Detected file MIME type or |
public read-only
integer
|
$errorCode
Error code or 0 on successful upload. |
public read-only
string
|
$filename
The temporary filename of the uploaded file. |
public read-only
mixed
|
$index
Iteration index for a multiple files set. |
public read-only
string
|
$key
Upload input form key of file set. |
public read-only
string
|
$md5
Binary MD5 checksum of 16 bytes length. |
public read-only
string
|
$mimeType
The MIME type of the uploaded file as given by the client. |
public read-only
boolean
|
$multipleFiles
Status whether multiple files are represented. |
public read-only
string
|
$sha1
Binary SHA-1 checksum of 20 bytes length. |
public read-only
integer
|
$size
Size in bytes of the uploaded file. |
public read-only
boolean
|
$success
Combined status of successful and verified upload. |
public read-only
boolean
|
$valid
Status of verified upload. |
Magic properties inherited from Core\Value
$bit
,
$bool
,
$float
,
$int
,
$isArray
,
$isBoolean
,
$isCallable
,
$isCallback
,
$isFloat
,
$isInteger
,
$isNull
,
$isNumeric
,
$isObject
,
$isOffset
,
$isResource
,
$isScalar
,
$isString
,
$onSet
,
$string
,
$stringObject
,
$value