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


Public Member Functions | |
| __construct ($options) | |
| getHash () | |
| setHash ($options) | |
| addHash ($options) | |
| isValid ($value, $file=null) | |
Data Fields | |
| const | DOES_NOT_MATCH = 'fileHashDoesNotMatch' |
| const | NOT_DETECTED = 'fileHashHashNotDetected' |
| const | NOT_FOUND = 'fileHashNotFound' |
Protected Member Functions | |
| _throw ($file, $errorType) | |
Protected Attributes | |
| $_messageTemplates | |
| $_hash | |
| __construct | ( | $ | options | ) |
Sets validator options
| string | array | $options |
Reimplemented in Zend_Validate_File_Md5, Zend_Validate_File_Sha1, and Zend_Validate_File_Crc32.
Definition at line 66 of file Hash.php.

| _throw | ( | $ | file, |
| $ | errorType | ||
| ) | [protected] |
| addHash | ( | $ | options | ) |
Adds the hash for one or multiple files
| string | array | $options |
Reimplemented in Zend_Validate_File_Md5, Zend_Validate_File_Sha1, and Zend_Validate_File_Crc32.
Definition at line 114 of file Hash.php.

| getHash | ( | ) |
| 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 in Zend_Validate_File_Md5, Zend_Validate_File_Sha1, and Zend_Validate_File_Crc32.
Definition at line 152 of file Hash.php.

| setHash | ( | $ | options | ) |
Sets the hash for one or multiple files
| string | array | $options |
Reimplemented in Zend_Validate_File_Md5, Zend_Validate_File_Sha1, and Zend_Validate_File_Crc32.
Definition at line 100 of file Hash.php.


$_hash [protected] |
Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.
$_messageTemplates [protected] |
array( self::DOES_NOT_MATCH => "File '%value%' does not match the given hashes", self::NOT_DETECTED => "A hash could not be evaluated for the given file", self::NOT_FOUND => "File '%value%' could not be found" )
Reimplemented from Zend_Validate_Abstract.
Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.
| const DOES_NOT_MATCH = 'fileHashDoesNotMatch' |
string Error constants
Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.
| const NOT_DETECTED = 'fileHashHashNotDetected' |
Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.
| const NOT_FOUND = 'fileHashNotFound' |
Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.