25 #require_once 'Zend/Validate/File/Hash.php'; 48 self::DOES_NOT_MATCH =>
"File '%value%' does not match the given md5 hashes",
49 self::NOT_DETECTED =>
"A md5 hash could not be evaluated for the given file",
50 self::NOT_FOUND =>
"File '%value%' is not readable or does not exist",
76 #require_once 'Zend/Validate/Exception.php'; 163 #require_once 'Zend/Loader.php'; 165 return $this->
_throw($file, self::NOT_FOUND);
168 $hashes = array_unique(array_keys($this->_hash));
169 $filehash = hash_file(
'md5',
$value);
170 if ($filehash ===
false) {
171 return $this->
_throw($file, self::NOT_DETECTED);
174 foreach($hashes as $hash) {
175 if ($filehash === $hash) {
180 return $this->
_throw($file, self::DOES_NOT_MATCH);
elseif(isset( $params[ 'redirect_parent']))
isValid($value, $file=null)
static isReadable($filename)
_throw($file, $errorType)