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