API Documentation

Validate/File/Hash.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
version
$Id: Hash.php 22697 2010-07-26 21:14:47Z alexander $
Classes
Zend_Validate_File_Hash

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Validate_File_Hash

Extends from
Zend_Validate_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
Constants
DOES_NOT_MATCH
NOT_DETECTED
NOT_FOUND
Properties
$_messageTemplates
$_hash
Methods
__construct
getHash
setHash
addHash
isValid
_throw

Description

Validator for the hash of given files

Constants

DOES_NOT_MATCH

 DOES_NOT_MATCH = 'fileHashDoesNotMatch'

Details

value
fileHashDoesNotMatch
const
string Error constants

NOT_DETECTED

 NOT_DETECTED = 'fileHashHashNotDetected'

Details

value
fileHashHashNotDetected

NOT_FOUND

 NOT_FOUND = 'fileHashNotFound'

Details

value
fileHashNotFound

Properties

$_hash

string $_hash = ''

Hash of the file

Details

$_hash
string
visibility
protected
default
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Details

$_messageTemplates
array
Error message templates
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( string|array $options ) : void

Sets validator options

Arguments
$options
stringarray
Details
visibility
public
final
false
static
false

_throw

_throw( string $file, string $errorType ) : false

Throws an error of the given type

Arguments
$file
string
$errorType
string
Output
false
Details
visibility
protected
final
false
static
false

addHash

addHash( string|array $options ) : Zend_Validate_File_Hash

Adds the hash for one or multiple files

Arguments
$options
stringarray
Output
Zend_Validate_File_Hash
Provides a fluent interface
Details
visibility
public
final
false
static
false

getHash

getHash( ) : array

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

Output
array
Details
visibility
public
final
false
static
false

isValid

isValid( string $value, array $file = null ) : boolean

Defined by Zend_Validate_Interface

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

Arguments
$value
string
Filename to check for hash
$file
array
File data from Zend_File_Transfer
Output
boolean
Details
visibility
public
final
false
static
false

setHash

setHash( string|array $options ) : Zend_Validate_File_Hash

Sets the hash for one or multiple files

Arguments
$options
stringarray
Output
Zend_Validate_File_Hash
Provides a fluent interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.