Validator for the maximum size of a file up to a max of 2GB
category | Zend |
---|---|
package | Zend_Validate |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Validate_Abstract |
__construct(array|\Zend_Config $files = array()
)
The array $files must be given in syntax of Zend_File_Transfer to be checked If no files are given the $_FILES array will be used automatically. NOTE: This validator will only work with HTTP POST uploads!
array
\Zend_Config
Array of files in syntax of Zend_File_Transfer
__get(string $property) : mixed
string
\Zend_Validate_Exception |
---|
mixed
getDefaultTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
getErrors() : array
deprecated | Since 1.5.0 |
---|
array
getFiles(string $file = null
) : array
string
(Optional) The file to return in detail
\Zend_Validate_Exception |
If file is not found |
---|
array
getMessageLength() : integer
integer
getMessageTemplates() : array
array
getMessageVariables() : array
array
getMessages() : array
If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.
inherited_from | \Zend_Validate_Interface::getMessages() |
---|
array
getObscureValue() : boolean
boolean
getTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
hasDefaultTranslator() : boolean
boolean
hasTranslator() : boolean
boolean
isValid(string $value, string|null $file = null
) : boolean
Returns true if and only if the file was uploaded without errors
string
Single file to check for upload errors, when giving null the $_FILES array from initialization will be used
string
null
boolean
setDefaultTranslator(\Zend_Translate|\Zend_Translate_Adapter|null $translator = null
)
\Zend_Translate
\Zend_Translate_Adapter
null
\Zend_Validate_Exception |
---|
setDisableTranslator(boolean $flag) : \Zend_Validate_Abstract
boolean
\Zend_Validate_Abstract
setFiles(array $files = array()
) : \Zend_Validate_File_Upload
array
The files to check in syntax of Zend_File_Transfer
\Zend_Validate_File_Upload
Provides a fluent interfacesetMessage(string $messageString, string $messageKey = null
) : \Zend_Validate_Abstract
string
string
OPTIONAL
\Zend_Validate_Exception |
---|
\Zend_Validate_Abstract
Provides a fluent interfacesetMessageLength(integer $length = -1
)
integer
setMessages(array $messages) : \Zend_Validate_Abstract
array
\Zend_Validate_Abstract
setObscureValue(boolean $flag) : \Zend_Validate_Abstract
boolean
\Zend_Validate_Abstract
setTranslator(\Zend_Translate|\Zend_Translate_Adapter|null $translator = null
) : \Zend_Validate_Abstract
\Zend_Translate
\Zend_Translate_Adapter
null
\Zend_Validate_Exception |
---|
\Zend_Validate_Abstract
translatorIsDisabled() : boolean
boolean
_createMessage(string $messageKey, string $value) : string
Returns null if and only if $messageKey does not correspond to an existing template.
If a translator is available and a translation exists for $messageKey, the translation will be used.
string
string
string
_error(string $messageKey, string $value = null
) : void
string
string
OPTIONAL
_implodeRecursive(array $pieces) : string
array
string
_setValue(mixed $value) : void
mixed
_throw(string $file, string $errorType) : false
string
string
false
$_defaultTranslator : \Zend_Translate
$_errors : array
array()
deprecated | Since 1.5.0 |
---|
$_files : array
array()
$_obscureValue : boolean
false
$_translator : \Zend_Translate
$_translatorDisabled : Boolean
false
$_value : mixed
ATTACK = 'fileUploadErrorAttack'
CANT_WRITE = 'fileUploadErrorCantWrite'
EXTENSION = 'fileUploadErrorExtension'
FILE_NOT_FOUND = 'fileUploadErrorFileNotFound'
FORM_SIZE = 'fileUploadErrorFormSize'
INI_SIZE = 'fileUploadErrorIniSize'
NO_FILE = 'fileUploadErrorNoFile'
NO_TMP_DIR = 'fileUploadErrorNoTmpDir'
PARTIAL = 'fileUploadErrorPartial'
UNKNOWN = 'fileUploadErrorUnknown'