classes/phing/tasks/ext/ManifestTask.php
\ManifestTask
ManifestTask
Generates a simple Manifest file with optional checksums.
Manifest schema: ... path/to/file CHECKSUM [CHECKSUM2] [CHECKSUM3] path/to/secondfile CHECKSUM [CHECKSUM2] [CHECKSUM3] ...
Example usage:
- Extends from
- \Task
- author
- David Persson
- copyright
- 2001,2002 THYRELL. All rights reserved
- package
- phing.tasks.ext
- since
- 2.3.1
- version
- $Id: ManifestTask.php 552 2009-08-29 12:18:13Z mrook $
Properties

string
$action= 'w'
Action
"r" or "w""w" for reading in files from fileSet and writing manifest
or
"r" for reading in files from fileSet and checking against manifest
wDetails- Type
- string

mixed
$checksum= 'false'
Enable/Disable checksuming or/and select algorithm true defaults to md5 false disables checksuming string "md5,sha256,..." enables generation of multiple checksums string "sha256" generates sha256 checksum only
falseDetails- Type
- mixed
Methods

createFileSet(
)
:
objectNested creator, creates a FileSet for this task
| Type | Description |
|---|---|
| object |
- access
- public

hash(
string $msg, string $algo
)
:
mixedWrapper method for hash generation
Automatically selects extension
Falls back to built-in functions
| Name | Type | Description |
|---|---|---|
| $msg | string | The string that should be hashed |
| $algo | string | Algorithm |
| Type | Description |
|---|---|
| mixed |

hashFile(
string $file, string $algo
)
:
mixedHash a files contents
plus it's size an modification time
| Name | Type | Description |
|---|---|---|
| $file | string | |
| $algo | string |
| Type | Description |
|---|---|
| mixed |

setChecksum(
mixed $mixed
)
:
voidThe setter for the attribute "checksum"
| Name | Type | Description |
|---|---|---|
| $mixed | mixed |

setFile(
string $file
)
:
voidThe setter for the attribute "file"
This is where the manifest will be written to/read from
| Name | Type | Description |
|---|---|---|
| $file | string | Path to readable file |

setSalt(
string $string
)
:
voidThe setter for the optional attribute "salt"
| Name | Type | Description |
|---|---|---|
| $string | string |