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


Public Member Functions | |
| __construct ($options) | |
| getSha1 () | |
| setHash ($options) | |
| setSha1 ($options) | |
| addHash ($options) | |
| addSha1 ($options) | |
| isValid ($value, $file=null) | |
Data Fields | |
| const | DOES_NOT_MATCH = 'fileSha1DoesNotMatch' |
| const | NOT_DETECTED = 'fileSha1NotDetected' |
| const | NOT_FOUND = 'fileSha1NotFound' |
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 Sha1.php.

| addHash | ( | $ | options | ) |
Adds the sha1 hash for one or multiple files
| string | array | $options |
Reimplemented from Zend_Validate_File_Hash.
Definition at line 127 of file Sha1.php.

| addSha1 | ( | $ | options | ) |
Adds the sha1 hash for one or multiple files
| string | array | $options |
Definition at line 144 of file Sha1.php.

| getSha1 | ( | ) |
| 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 159 of file Sha1.php.

| setHash | ( | $ | options | ) |
Sets the sha1 hash for one or multiple files
| string | array | $options |
Reimplemented from Zend_Validate_File_Hash.
Definition at line 98 of file Sha1.php.

| setSha1 | ( | $ | options | ) |
Sets the sha1 hash for one or multiple files
| string | array | $options |
Definition at line 115 of file Sha1.php.

$_hash [protected] |
Reimplemented from Zend_Validate_File_Hash.
$_messageTemplates [protected] |
array( self::DOES_NOT_MATCH => "File '%value%' does not match the given sha1 hashes", self::NOT_DETECTED => "A sha1 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 = 'fileSha1DoesNotMatch' |
string Error constants
Reimplemented from Zend_Validate_File_Hash.
| const NOT_DETECTED = 'fileSha1NotDetected' |
Reimplemented from Zend_Validate_File_Hash.
| const NOT_FOUND = 'fileSha1NotFound' |
Reimplemented from Zend_Validate_File_Hash.