Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Validator for the maximum size of a file up to a max of 2GB
INI_SIZE = 'fileUploadErrorIniSize'
FORM_SIZE = 'fileUploadErrorFormSize'
PARTIAL = 'fileUploadErrorPartial'
NO_FILE = 'fileUploadErrorNoFile'
NO_TMP_DIR = 'fileUploadErrorNoTmpDir'
CANT_WRITE = 'fileUploadErrorCantWrite'
EXTENSION = 'fileUploadErrorExtension'
ATTACK = 'fileUploadErrorAttack'
FILE_NOT_FOUND = 'fileUploadErrorFileNotFound'
UNKNOWN = 'fileUploadErrorUnknown'
array $_files = 'array'
Internal array of files
array $_messageTemplates = 'array'
__construct(
array|Zend_Config $files
=
array
)
:
void
Sets validator options
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!
_throw(
string $file, string $errorType
)
:
false
Throws an error of the given type
getFiles(
$file
=
null
)
:
array
Returns the array of set files
isValid(
string $value, $file
=
null
)
:
boolean
Defined by Zend_Validate_Interface
Returns true if and only if the file was uploaded without errors
setFiles(
array $files
=
array
)
:
Zend_Validate_File_Upload
Sets the files to be checked