|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($options) | |
| getMd5 () | |
| setHash ($options) | |
| setMd5 ($options) | |
| addHash ($options) | |
| addMd5 ($options) | |
| isValid ($value, $file=null) | |
Data Fields | |
| const | DOES_NOT_MATCH = 'fileMd5DoesNotMatch' |
| const | NOT_DETECTED = 'fileMd5NotDetected' |
| const | NOT_FOUND = 'fileMd5NotFound' |
Protected Attributes | |
| $_messageTemplates | |
| $_hash | |
| __construct | ( | $ | options | ) |
Sets validator options
$hash is the hash we accept for the file $file
| string | array | $options |
Reimplemented from Zend_Validate_File_Hash.
Definition at line 68 of file Md5.php.

| addHash | ( | $ | options | ) |
Adds the md5 hash for one or multiple files
| string | array | $options | |
| string | $algorithm | (Deprecated) Algorithm to use, fixed to md5 |
Reimplemented from Zend_Validate_File_Hash.
Definition at line 129 of file Md5.php.

| addMd5 | ( | $ | options | ) |
Adds the md5 hash for one or multiple files
| string | array | $options |
Definition at line 146 of file Md5.php.

| getMd5 | ( | ) |
| isValid | ( | $ | value, |
| $ | file = null |
||
| ) |
Defined by Zend_Validate_Interface
Returns true if and only if the given file confirms the set hash
| string | $value | Filename to check for hash |
| array | $file | File data from Zend_File_Transfer |
Reimplemented from Zend_Validate_File_Hash.
Definition at line 161 of file Md5.php.

| setHash | ( | $ | options | ) |
Sets the md5 hash for one or multiple files
| string | array | $options | |
| string | $algorithm | (Deprecated) Algorithm to use, fixed to md5 |
Reimplemented from Zend_Validate_File_Hash.
Definition at line 99 of file Md5.php.

| setMd5 | ( | $ | options | ) |
Sets the md5 hash for one or multiple files
| string | array | $options |
Definition at line 116 of file Md5.php.


$_hash [protected] |
Reimplemented from Zend_Validate_File_Hash.
$_messageTemplates [protected] |
array( self::DOES_NOT_MATCH => "File '%value%' does not match the given md5 hashes", self::NOT_DETECTED => "A md5 hash could not be evaluated for the given file", self::NOT_FOUND => "File '%value%' could not be found", )
Reimplemented from Zend_Validate_File_Hash.
| const DOES_NOT_MATCH = 'fileMd5DoesNotMatch' |
string Error constants
Reimplemented from Zend_Validate_File_Hash.
| const NOT_DETECTED = 'fileMd5NotDetected' |
Reimplemented from Zend_Validate_File_Hash.
| const NOT_FOUND = 'fileMd5NotFound' |
Reimplemented from Zend_Validate_File_Hash.