Moodle  2.2.1
http://www.collinsharper.com
Zend_Validate_File_FilesSize Class Reference
Inheritance diagram for Zend_Validate_File_FilesSize:
Collaboration diagram for Zend_Validate_File_FilesSize:

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.

Here is the call graph for this function:


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 105 of file FilesSize.php.

Here is the call graph for this function:


Field Documentation

$_files [protected]

Definition at line 58 of file FilesSize.php.

$_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 NOT_READABLE = 'fileFilesSizeNotReadable'

Definition at line 42 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.

const TOO_SMALL = 'fileFilesSizeTooSmall'

Reimplemented from Zend_Validate_File_Size.

Definition at line 41 of file FilesSize.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations