Public Member Functions | Data Fields | Protected Attributes

Zend_Validate_File_Crc32 Class Reference

Inheritance diagram for Zend_Validate_File_Crc32:
Zend_Validate_File_Hash Zend_Validate_Abstract Zend_Validate_Interface

Public Member Functions

 __construct ($options)
 getCrc32 ()
 setHash ($options)
 setCrc32 ($options)
 addHash ($options)
 addCrc32 ($options)
 isValid ($value, $file=null)

Data Fields

const DOES_NOT_MATCH = 'fileCrc32DoesNotMatch'
const NOT_DETECTED = 'fileCrc32NotDetected'
const NOT_FOUND = 'fileCrc32NotFound'

Protected Attributes

 $_messageTemplates
 $_hash

Detailed Description

Definition at line 35 of file Crc32.php.


Constructor & Destructor Documentation

__construct ( options )

Sets validator options

Parameters:
string | array | Zend_Config$options
Returns:
void

Reimplemented from Zend_Validate_File_Hash.

Definition at line 66 of file Crc32.php.


Member Function Documentation

addCrc32 ( options )

Adds the crc32 hash for one or multiple files

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

Definition at line 142 of file Crc32.php.

addHash ( options )

Adds the crc32 hash for one or multiple files

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

Reimplemented from Zend_Validate_File_Hash.

Definition at line 125 of file Crc32.php.

getCrc32 (  )

Returns all set crc32 hashes

Returns:
array

Definition at line 85 of file Crc32.php.

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 157 of file Crc32.php.

setCrc32 ( options )

Sets the crc32 hash for one or multiple files

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

Definition at line 113 of file Crc32.php.

setHash ( options )

Sets the crc32 hash for one or multiple files

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

Reimplemented from Zend_Validate_File_Hash.

Definition at line 96 of file Crc32.php.


Field Documentation

$_messageTemplates [protected]
Initial value:
 array(
        self::DOES_NOT_MATCH => "The file '%value%' does not match the given crc32 hashes",
        self::NOT_DETECTED   => "There was no crc32 hash detected for the given file",
        self::NOT_FOUND      => "The file '%value%' could not be found"
    )

Reimplemented from Zend_Validate_File_Hash.

Definition at line 47 of file Crc32.php.

const DOES_NOT_MATCH = 'fileCrc32DoesNotMatch'

string Error constants

Reimplemented from Zend_Validate_File_Hash.

Definition at line 40 of file Crc32.php.


The documentation for this class was generated from the following file: