Class Zend_Validate_File_Hash

Description

Validator for the hash of given files

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Validate/File/Hash.php (line 35)

Zend_Validate_Abstract
   |
   --Zend_Validate_File_Hash
Direct descendents
Class Description
 class Zend_Validate_File_Sha1 Validator for the sha1 hash of given files
 class Zend_Validate_File_Md5 Validator for the md5 hash of given files
 class Zend_Validate_File_Crc32 Validator for the crc32 hash of given files
Class Constant Summary
 DOES_NOT_MATCH = 'fileHashDoesNotMatch'
 NOT_DETECTED = 'fileHashHashNotDetected'
 NOT_FOUND = 'fileHashNotFound'
Variable Summary
 string $_hash
Method Summary
 void __construct (string|array $options)
 Zend_Validate_File_Hash addHash (string|array $options)
 array getHash ()
 boolean isValid (string $value, [array $file = null])
 Zend_Validate_File_Hash setHash (string|array $options)
 false _throw (string $file, string $errorType)
Variables
string $_hash (line 58)

Hash of the file

  • access: protected

Redefined in descendants as:
array $_messageTemplates = 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"
)
(line 47)
  • var: Error message templates
  • access: protected

Redefinition of:
Zend_Validate_Abstract::$_messageTemplates
Validation failure message template definitions

Redefined in descendants as:

Inherited Variables

Inherited from Zend_Validate_Abstract

Zend_Validate_Abstract::$_defaultTranslator
Zend_Validate_Abstract::$_errors
Zend_Validate_Abstract::$_messageLength
Zend_Validate_Abstract::$_messages
Zend_Validate_Abstract::$_messageVariables
Zend_Validate_Abstract::$_obscureValue
Zend_Validate_Abstract::$_translator
Zend_Validate_Abstract::$_translatorDisabled
Zend_Validate_Abstract::$_value
Methods
Constructor __construct (line 66)

Sets validator options

  • access: public
void __construct (string|array $options)
  • string|array $options

Redefined in descendants as:
addHash (line 114)

Adds the hash for one or multiple files

  • return: Provides a fluent interface
  • access: public
Zend_Validate_File_Hash addHash (string|array $options)
  • string|array $options

Redefined in descendants as:
getHash (line 89)

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

  • access: public
array getHash ()
isValid (line 152)

Defined by Zend_Validate_Interface

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

  • access: public
boolean isValid (string $value, [array $file = null])
  • string $value: Filename to check for hash
  • array $file: File data from Zend_File_Transfer

Redefined in descendants as:
setHash (line 100)

Sets the hash for one or multiple files

  • return: Provides a fluent interface
  • access: public
Zend_Validate_File_Hash setHash (string|array $options)
  • string|array $options

Redefined in descendants as:
_throw (line 185)

Throws an error of the given type

  • access: protected
false _throw (string $file, string $errorType)
  • string $file
  • string $errorType

Inherited Methods

Inherited From Zend_Validate_Abstract

 Zend_Validate_Abstract::getDefaultTranslator()
 Zend_Validate_Abstract::getErrors()
 Zend_Validate_Abstract::getMessageLength()
 Zend_Validate_Abstract::getMessages()
 Zend_Validate_Abstract::getMessageTemplates()
 Zend_Validate_Abstract::getMessageVariables()
 Zend_Validate_Abstract::getObscureValue()
 Zend_Validate_Abstract::getTranslator()
 Zend_Validate_Abstract::hasDefaultTranslator()
 Zend_Validate_Abstract::hasTranslator()
 Zend_Validate_Abstract::setDefaultTranslator()
 Zend_Validate_Abstract::setDisableTranslator()
 Zend_Validate_Abstract::setMessage()
 Zend_Validate_Abstract::setMessageLength()
 Zend_Validate_Abstract::setMessages()
 Zend_Validate_Abstract::setObscureValue()
 Zend_Validate_Abstract::setTranslator()
 Zend_Validate_Abstract::translatorIsDisabled()
 Zend_Validate_Abstract::_createMessage()
 Zend_Validate_Abstract::_error()
 Zend_Validate_Abstract::_setValue()
 Zend_Validate_Abstract::__get()
Class Constants
DOES_NOT_MATCH = 'fileHashDoesNotMatch' (line 40)
NOT_DETECTED = 'fileHashHashNotDetected' (line 41)
NOT_FOUND = 'fileHashNotFound' (line 42)

Documentation generated on Mon, 21 Jun 2010 15:26:06 -0400 by phpDocumentor 1.4.3