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

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

Detailed Description

Definition at line 35 of file Hash.php.


Constructor & Destructor Documentation

__construct ( options)

Sets validator options

Parameters:
string | array$options
Returns:
void

Reimplemented in Zend_Validate_File_Md5, Zend_Validate_File_Sha1, and Zend_Validate_File_Crc32.

Definition at line 66 of file Hash.php.

Here is the call graph for this function:


Member Function Documentation

_throw ( file,
errorType 
) [protected]

Throws an error of the given type

Parameters:
string$file
string$errorType
Returns:
false

Definition at line 185 of file Hash.php.

Here is the call graph for this function:

Here is the caller graph for this function:

addHash ( options)

Adds the hash for one or multiple files

Parameters:
string | array$options
Returns:
Zend_Validate_File_Hash Provides a fluent interface

Reimplemented in Zend_Validate_File_Md5, Zend_Validate_File_Sha1, and Zend_Validate_File_Crc32.

Definition at line 114 of file Hash.php.

Here is the caller graph for this function:

getHash ( )

Returns the set hash values as array, the hash as key and the algorithm the value

Returns:
array

Definition at line 89 of file Hash.php.

Here is the caller graph for this function:

isValid ( value,
file = null 
)

Defined by Zend_Validate_Interface

Returns true if and only if the given file confirms the set hash

Parameters:
string$valueFilename to check for hash
array$fileFile data from Zend_File_Transfer
Returns:
boolean

Reimplemented in Zend_Validate_File_Md5, Zend_Validate_File_Sha1, and Zend_Validate_File_Crc32.

Definition at line 152 of file Hash.php.

Here is the call graph for this function:

setHash ( options)

Sets the hash for one or multiple files

Parameters:
string | array$options
Returns:
Zend_Validate_File_Hash Provides a fluent interface

Reimplemented in Zend_Validate_File_Md5, Zend_Validate_File_Sha1, and Zend_Validate_File_Crc32.

Definition at line 100 of file Hash.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_hash [protected]

Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.

Definition at line 58 of file Hash.php.

$_messageTemplates [protected]
Initial value:
 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.

Definition at line 47 of file Hash.php.

const DOES_NOT_MATCH = 'fileHashDoesNotMatch'

string Error constants

Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.

Definition at line 40 of file Hash.php.

const NOT_DETECTED = 'fileHashHashNotDetected'

Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.

Definition at line 41 of file Hash.php.

const NOT_FOUND = 'fileHashNotFound'

Reimplemented in Zend_Validate_File_Crc32, Zend_Validate_File_Md5, and Zend_Validate_File_Sha1.

Definition at line 42 of file Hash.php.


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