API Documentation

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

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_Md5

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
getMd5
setHash
setMd5
addHash
addMd5
isValid

Description

Validator for the md5 hash of given files

Constants

DOES_NOT_MATCH

 DOES_NOT_MATCH = 'fileMd5DoesNotMatch'

Details

value
fileMd5DoesNotMatch
const
string Error constants

NOT_DETECTED

 NOT_DETECTED = 'fileMd5NotDetected'

Details

value
fileMd5NotDetected

NOT_FOUND

 NOT_FOUND = 'fileMd5NotFound'

Details

value
fileMd5NotFound

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

addMd5

addMd5( string|array $options ) : Zend_Validate_File_Hash

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

getMd5

getMd5( ) : array

Returns all set md5 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 md5 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

setMd5

setMd5( string|array $options ) : Zend_Validate_File_Hash

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