classes/phing/tasks/ext/FileHashTask.php

fileHash

Calculate either MD5 or SHA hash value of a specified file and retun the value in a property

author
Johan Persson
package
phing.tasks.ext
version
$Id: FileHashTask.php 1084 2011-05-06 09:55:25Z mrook $

\FileHashTask

fileHash

Calculate either MD5 or SHA hash value of a specified file and retun the value in a property

Extends from
\Task
author
Johan Persson
copyright
2001,2002 THYRELL. All rights reserved
package
phing.tasks.ext
version
$Id: FileHashTask.php 1084 2011-05-06 09:55:25Z mrook $

Properties

Propertyprivate\PhingFile  $file= ''

Property for File

file
Details
Type
\PhingFile
Propertyprivateinteger  $hashtype= '0'

Specify which hash algorithm to use.

0 = MD5 1 = SHA1

Default value0Details
Type
integer
Propertyprivatestring  $propertyName= 'filehashvalue'

Property to be set

Default valuefilehashvalueDetails
Type
string

Methods

methodprivate  checkFile( ) : void
checks file attribute
Details
throws
methodprivate  checkPropertyName( ) : void
checks property attribute
Details
throws
methodpublic  main( ) : void
Main-Method for the Task
Details
throws
methodpublic  setFile( \PhingFile $file ) :
Which file to calculate the hash value of
Parameters
Name Type Description
$file \PhingFile
methodpublic  setHashtype( integer $type ) :
Specify if MD5 or SHA1 hash should be used
Parameters
Name Type Description
$type integer

0=MD5, 1=SHA1

methodpublic  setPropertyName(  $property ) : void
Set the name of the property to store the hash value in
Parameters
Name Type Description
$property
Documentation was generated by DocBlox 0.13.1.