API Documentation

Validate/File/Sha1.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: Sha1.php 22697 2010-07-26 21:14:47Z alexander $
Classes
Zend_Validate_File_Sha1

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_Sha1

Extends from
Zend_Validate_File_Hash
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
getSha1
setHash
setSha1
addHash
addSha1
isValid

Description

Validator for the sha1 hash of given files

Constants

DOES_NOT_MATCH

 DOES_NOT_MATCH = 'fileSha1DoesNotMatch'

Details

value
fileSha1DoesNotMatch
const
string Error constants

NOT_DETECTED

 NOT_DETECTED = 'fileSha1NotDetected'

Details

value
fileSha1NotDetected

NOT_FOUND

 NOT_FOUND = 'fileSha1NotFound'

Details

value
fileSha1NotFound

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

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

Arguments
$options
stringarray
Details
visibility
public
final
false
static
false

addHash

addHash( string|array $options ) : Zend_Validate_File_Hash

Adds the sha1 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

addSha1

addSha1( string|array $options ) : Zend_Validate_File_Hash

Adds the sha1 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

getSha1

getSha1( ) : array

Returns all set sha1 hashes

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 sha1 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

setSha1

setSha1( string|array $options ) : Zend_Validate_File_Hash

Sets the sha1 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.