25 #require_once 'Zend/Validate/File/Count.php'; 49 self::TOO_MUCH =>
"Too much words, maximum '%max%' are allowed but '%count%' were counted",
50 self::TOO_LESS =>
"Too less words, minimum '%min%' are expected but '%count%' were counted",
51 self::NOT_FOUND =>
"File '%value%' is not readable or does not exist",
67 #require_once 'Zend/Loader.php'; 69 return $this->
_throw($file, self::NOT_FOUND);
73 $this->_count = str_word_count(
$content);
74 if (($this->_max !==
null) && ($this->_count > $this->_max)) {
75 return $this->
_throw($file, self::TOO_MUCH);
78 if (($this->_min !==
null) && ($this->_count < $this->_min)) {
79 return $this->
_throw($file, self::TOO_LESS);
92 protected function _throw($file, $errorType)
95 $this->_value = $file[
'name'];
isValid($value, $file=null)
_throw($file, $errorType)
_error($messageKey, $value=null)
static isReadable($filename)