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

__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!
Name | Type | Description |
---|---|---|
$files | array|\Zend_Config | Array of files in syntax of Zend_File_Transfer |

_throw(
string $file, string $errorType
)
:
false
Throws an error of the given type
Name | Type | Description |
---|---|---|
$file | string | |
$errorType | string |
Type | Description |
---|---|
false |

getFiles(
$file
=
null
)
:
array
Returns the array of set files
Name | Type | Description |
---|---|---|
$file |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Validate_Exception | If file is not found |

isValid(
string $value, $file
=
null
)
:
boolean
Defined by Zend_Validate_Interface
Returns true if and only if the file was uploaded without errors
Name | Type | Description |
---|---|---|
$value | string | Single file to check for upload errors, when giving null the $_FILES array from initialization will be used |
$file |
Type | Description |
---|---|
boolean |

setFiles(
array $files
=
array()
)
:
\Zend_Validate_File_Upload
Sets the files to be checked
Name | Type | Description |
---|---|---|
$files | array | The files to check in syntax of Zend_File_Transfer |
Type | Description |
---|---|
\Zend_Validate_File_Upload | Provides a fluent interface |