Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes

Zend_Validate_File_WordCount Class Reference

Inheritance diagram for Zend_Validate_File_WordCount:
Zend_Validate_File_Count Zend_Validate_Abstract Zend_Validate_Interface

Public Member Functions

 isValid ($value, $file=null)

Data Fields

const TOO_MUCH = 'fileWordCountTooMuch'
const TOO_LESS = 'fileWordCountTooLess'
const NOT_FOUND = 'fileWordCountNotFound'

Protected Member Functions

 _throw ($file, $errorType)

Protected Attributes

 $_messageTemplates

Detailed Description

Definition at line 35 of file WordCount.php.


Member Function Documentation

_throw ( file,
errorType 
) [protected]

Throws an error of the given type

Parameters:
string$file
string$errorType
Returns:
false

Reimplemented from Zend_Validate_File_Count.

Definition at line 92 of file WordCount.php.

isValid ( value,
file = null 
)

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).

Parameters:
string$valueFilename to check for word count
array$fileFile data from Zend_File_Transfer
Returns:
boolean

Reimplemented from Zend_Validate_File_Count.

Definition at line 64 of file WordCount.php.


Field Documentation

$_messageTemplates [protected]
Initial value:
 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 => "The file '%value%' could not be found"
    )

Reimplemented from Zend_Validate_File_Count.

Definition at line 48 of file WordCount.php.

const TOO_MUCH = 'fileWordCountTooMuch'

#@+ string Error constants

Reimplemented from Zend_Validate_File_Count.

Definition at line 40 of file WordCount.php.


The documentation for this class was generated from the following file: