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

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

Detailed Description

Definition at line 35 of file Md5.php.


Constructor & Destructor Documentation

__construct ( options)

Sets validator options

$hash is the hash we accept for the file $file

Parameters:
string | array$options
Returns:
void

Reimplemented from Zend_Validate_File_Hash.

Definition at line 68 of file Md5.php.

Here is the call graph for this function:


Member Function Documentation

addHash ( options)

Adds the md5 hash for one or multiple files

Parameters:
string | array$options
string$algorithm(Deprecated) Algorithm to use, fixed to md5
Returns:
Zend_Validate_File_Hash Provides a fluent interface

Reimplemented from Zend_Validate_File_Hash.

Definition at line 129 of file Md5.php.

Here is the caller graph for this function:

addMd5 ( options)

Adds the md5 hash for one or multiple files

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

Definition at line 146 of file Md5.php.

Here is the call graph for this function:

getMd5 ( )

Returns all set md5 hashes

Returns:
array

Definition at line 87 of file Md5.php.

Here is the call 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 from Zend_Validate_File_Hash.

Definition at line 161 of file Md5.php.

Here is the call graph for this function:

setHash ( options)

Sets the md5 hash for one or multiple files

Parameters:
string | array$options
string$algorithm(Deprecated) Algorithm to use, fixed to md5
Returns:
Zend_Validate_File_Hash Provides a fluent interface

Reimplemented from Zend_Validate_File_Hash.

Definition at line 99 of file Md5.php.

Here is the caller graph for this function:

setMd5 ( options)

Sets the md5 hash for one or multiple files

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

Definition at line 116 of file Md5.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_hash [protected]

Reimplemented from Zend_Validate_File_Hash.

Definition at line 58 of file Md5.php.

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

Definition at line 47 of file Md5.php.

const DOES_NOT_MATCH = 'fileMd5DoesNotMatch'

string Error constants

Reimplemented from Zend_Validate_File_Hash.

Definition at line 40 of file Md5.php.

const NOT_DETECTED = 'fileMd5NotDetected'

Reimplemented from Zend_Validate_File_Hash.

Definition at line 41 of file Md5.php.

const NOT_FOUND = 'fileMd5NotFound'

Reimplemented from Zend_Validate_File_Hash.

Definition at line 42 of file Md5.php.


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