Public Member Functions | Data Fields | Protected Attributes

Zend_Validate_File_FilesSize Class Reference

Inheritance diagram for Zend_Validate_File_FilesSize:
Zend_Validate_File_Size Zend_Validate_Abstract Zend_Validate_Interface

Public Member Functions

 __construct ($options)
 isValid ($value, $file=null)

Data Fields

const TOO_BIG = 'fileFilesSizeTooBig'
const TOO_SMALL = 'fileFilesSizeTooSmall'
const NOT_READABLE = 'fileFilesSizeNotReadable'

Protected Attributes

 $_messageTemplates
 $_files

Detailed Description

Definition at line 35 of file FilesSize.php.


Constructor & Destructor Documentation

__construct ( options )

Sets validator options

Min limits the used diskspace for all files, when used with max=null it is the maximum filesize It also accepts an array with the keys 'min' and 'max'

Parameters:
integer | array | Zend_Config$optionsOptions for this validator
Returns:
void

Reimplemented from Zend_Validate_File_Size.

Definition at line 69 of file FilesSize.php.


Member Function Documentation

isValid ( value,
file = null 
)

Defined by Zend_Validate_Interface

Returns true if and only if the disk usage of all files is at least min and not bigger than max (when max is not null).

Parameters:
string | array$valueReal file to check for size
array$fileFile data from Zend_File_Transfer
Returns:
boolean

Reimplemented from Zend_Validate_File_Size.

Definition at line 108 of file FilesSize.php.


Field Documentation

$_messageTemplates [protected]
Initial value:
 array(
        self::TOO_BIG      => "All files in sum should have a maximum size of '%max%' but '%size%' were detected",
        self::TOO_SMALL    => "All files in sum should have a minimum size of '%min%' but '%size%' were detected",
        self::NOT_READABLE => "One or more files can not be read"
    )

Reimplemented from Zend_Validate_File_Size.

Definition at line 47 of file FilesSize.php.

const TOO_BIG = 'fileFilesSizeTooBig'

string Error constants

Reimplemented from Zend_Validate_File_Size.

Definition at line 40 of file FilesSize.php.


The documentation for this class was generated from the following file: