Class Zend_Validate_File_Sha1

Description

Validator for the sha1 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/Sha1.php (line 35)

Zend_Validate_Abstract
   |
   --Zend_Validate_File_Hash
      |
      --Zend_Validate_File_Sha1
Class Constant Summary
 DOES_NOT_MATCH = 'fileSha1DoesNotMatch'
 NOT_DETECTED = 'fileSha1NotDetected'
 NOT_FOUND = 'fileSha1NotFound'
Variable Summary
 string $_hash
Method Summary
 Zend_Validate_File_Hash addHash (string|array $options)
 Zend_Validate_File_Hash addSha1 (string|array $options)
 array getSha1 ()
 boolean isValid (string $value, [array $file = null])
 void __construct (string|array $options)
 Zend_Validate_File_Hash setHash (string|array $options)
 Zend_Validate_File_Hash setSha1 (string|array $options)
Variables
string $_hash (line 58)

Hash of the file

  • access: protected

Redefinition of:
Zend_Validate_File_Hash::$_hash
Hash of the file
array $_messageTemplates = 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",
)
(line 47)
  • var: Error message templates
  • access: protected

Redefinition of:
Zend_Validate_File_Hash::$_messageTemplates

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
addHash (line 127)

Adds the sha1 hash for one or multiple files

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

Redefinition of:
Zend_Validate_File_Hash::addHash()
Adds the hash for one or multiple files
addSha1 (line 144)

Adds the sha1 hash for one or multiple files

  • return: Provides a fluent interface
  • access: public
Zend_Validate_File_Hash addSha1 (string|array $options)
  • string|array $options
getSha1 (line 87)

Returns all set sha1 hashes

  • access: public
array getSha1 ()
isValid (line 159)

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

Redefinition of:
Zend_Validate_File_Hash::isValid()
Defined by Zend_Validate_Interface
Constructor __construct (line 68)

Sets validator options

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

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

Redefinition of:
Zend_Validate_File_Hash::__construct()
Sets validator options
setHash (line 98)

Sets the sha1 hash for one or multiple files

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

Redefinition of:
Zend_Validate_File_Hash::setHash()
Sets the hash for one or multiple files
setSha1 (line 115)

Sets the sha1 hash for one or multiple files

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

Inherited Methods

Inherited From Zend_Validate_File_Hash

 Zend_Validate_File_Hash::__construct()
 Zend_Validate_File_Hash::addHash()
 Zend_Validate_File_Hash::getHash()
 Zend_Validate_File_Hash::isValid()
 Zend_Validate_File_Hash::setHash()
 Zend_Validate_File_Hash::_throw()

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 = 'fileSha1DoesNotMatch' (line 40)
NOT_DETECTED = 'fileSha1NotDetected' (line 41)
NOT_FOUND = 'fileSha1NotFound' (line 42)

Inherited Constants

Inherited from Zend_Validate_File_Hash

Zend_Validate_File_Hash::DOES_NOT_MATCH
Zend_Validate_File_Hash::NOT_DETECTED
Zend_Validate_File_Hash::NOT_FOUND

Documentation generated on Mon, 21 Jun 2010 15:44:37 -0400 by phpDocumentor 1.4.3