25 #require_once 'Zend/Validate/File/Size.php'; 48 self::TOO_BIG =>
"All files in sum should have a maximum size of '%max%' but '%size%' were detected",
49 self::TOO_SMALL =>
"All files in sum should have a minimum size of '%min%' but '%size%' were detected",
50 self::NOT_READABLE =>
"One or more files can not be read",
71 $this->_files = array();
79 #require_once 'Zend/Validate/Exception.php'; 83 if (1 < func_num_args()) {
84 $argv = func_get_args();
86 $options[
'max'] = array_shift($argv);
88 $options[
'bytestring'] = array_shift($argv);
107 #require_once 'Zend/Loader.php'; 112 $min = $this->
getMin(
true);
113 $max = $this->
getMax(
true);
118 $this->
_throw($file, self::NOT_READABLE);
122 if (!isset($this->_files[
$files])) {
131 $this->_size = $size;
132 if (($max !==
null) && ($max < $size)) {
136 $this->
_throw($file, self::TOO_BIG);
138 $this->_size = $size;
140 $this->
_throw($file, self::TOO_BIG);
146 if (($min !==
null) && ($size < $min)) {
150 $this->
_throw($file, self::TOO_SMALL);
152 $this->_size = $size;
154 $this->
_throw($file, self::TOO_SMALL);
158 return empty($this->_messages);
elseif(isset( $params[ 'redirect_parent']))
static isReadable($filename)
isValid($value, $file=null)
_throw($file, $errorType)
foreach($appDirs as $dir) $files