Class Zend_Validate_File_WordCount

Description

Validator for counting all words in a file

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Validate/File/WordCount.php (line 35)

Zend_Validate_Abstract
   |
   --Zend_Validate_File_Count
      |
      --Zend_Validate_File_WordCount
Class Constant Summary
 NOT_FOUND = 'fileWordCountNotFound'
 TOO_LESS = 'fileWordCountTooLess'
 TOO_MUCH = 'fileWordCountTooMuch'
Variable Summary
Method Summary
 boolean isValid (string $value, [array $file = null])
 false _throw (string $file, string $errorType)
Variables
array $_messageTemplates = array(
self::TOO_MUCH => "Too much words, maximum '%max%' are allowed but '%count%' were counted",
self::TOO_LESS => "Too less words, minimum '%min%' are expected but '%count%' were counted",
self::NOT_FOUND => "File '%value%' could not be found",
)
(line 48)
  • var: Error message templates
  • access: protected

Redefinition of:
Zend_Validate_File_Count::$_messageTemplates

Inherited Variables

Inherited from Zend_Validate_File_Count

Zend_Validate_File_Count::$_count
Zend_Validate_File_Count::$_files
Zend_Validate_File_Count::$_max
Zend_Validate_File_Count::$_messageVariables
Zend_Validate_File_Count::$_min

Inherited from Zend_Validate_Abstract

Zend_Validate_Abstract::$_defaultTranslator
Zend_Validate_Abstract::$_errors
Zend_Validate_Abstract::$_messageLength
Zend_Validate_Abstract::$_messages
Zend_Validate_Abstract::$_obscureValue
Zend_Validate_Abstract::$_translator
Zend_Validate_Abstract::$_translatorDisabled
Zend_Validate_Abstract::$_value
Methods
isValid (line 64)

Defined by Zend_Validate_Interface

Returns true if and only if the counted words are at least min and not bigger than max (when max is not null).

  • access: public
boolean isValid (string $value, [array $file = null])
  • string $value: Filename to check for word count
  • array $file: File data from Zend_File_Transfer

Redefinition of:
Zend_Validate_File_Count::isValid()
Defined by Zend_Validate_Interface
_throw (line 92)

Throws an error of the given type

  • access: protected
false _throw (string $file, string $errorType)
  • string $file
  • string $errorType

Redefinition of:
Zend_Validate_File_Count::_throw()
Throws an error of the given type

Inherited Methods

Inherited From Zend_Validate_File_Count

 Zend_Validate_File_Count::__construct()
 Zend_Validate_File_Count::addFile()
 Zend_Validate_File_Count::getMax()
 Zend_Validate_File_Count::getMin()
 Zend_Validate_File_Count::isValid()
 Zend_Validate_File_Count::setMax()
 Zend_Validate_File_Count::setMin()
 Zend_Validate_File_Count::_throw()

Inherited From Zend_Validate_Abstract

 Zend_Validate_Abstract::getDefaultTranslator()
 Zend_Validate_Abstract::getErrors()
 Zend_Validate_Abstract::getMessageLength()
 Zend_Validate_Abstract::getMessages()
 Zend_Validate_Abstract::getMessageTemplates()
 Zend_Validate_Abstract::getMessageVariables()
 Zend_Validate_Abstract::getObscureValue()
 Zend_Validate_Abstract::getTranslator()
 Zend_Validate_Abstract::hasDefaultTranslator()
 Zend_Validate_Abstract::hasTranslator()
 Zend_Validate_Abstract::setDefaultTranslator()
 Zend_Validate_Abstract::setDisableTranslator()
 Zend_Validate_Abstract::setMessage()
 Zend_Validate_Abstract::setMessageLength()
 Zend_Validate_Abstract::setMessages()
 Zend_Validate_Abstract::setObscureValue()
 Zend_Validate_Abstract::setTranslator()
 Zend_Validate_Abstract::translatorIsDisabled()
 Zend_Validate_Abstract::_createMessage()
 Zend_Validate_Abstract::_error()
 Zend_Validate_Abstract::_setValue()
 Zend_Validate_Abstract::__get()
Class Constants
NOT_FOUND = 'fileWordCountNotFound' (line 42)
TOO_LESS = 'fileWordCountTooLess' (line 41)
TOO_MUCH = 'fileWordCountTooMuch' (line 40)

Inherited Constants

Inherited from Zend_Validate_File_Count

Zend_Validate_File_Count::TOO_FEW
Zend_Validate_File_Count::TOO_MANY

Documentation generated on Mon, 21 Jun 2010 15:53:00 -0400 by phpDocumentor 1.4.3