Public Member Functions | |
__construct ($options) | |
getCase () | |
setCase ($case) | |
getExtension () | |
setExtension ($extension) | |
addExtension ($extension) | |
isValid ($value, $file=null) | |
Data Fields | |
const | FALSE_EXTENSION = 'fileExtensionFalse' |
const | NOT_FOUND = 'fileExtensionNotFound' |
Protected Member Functions | |
_throw ($file, $errorType) | |
Protected Attributes | |
$_messageTemplates | |
$_extension = '' | |
$_case = false | |
$_messageVariables |
Definition at line 35 of file Extension.php.
__construct | ( | $ | options ) |
Sets validator options
string | array | Zend_Config | $options |
Definition at line 77 of file Extension.php.
_throw | ( | $ | file, |
$ | errorType | ||
) | [protected] |
Throws an error of the given type
string | $file | |
string | $errorType |
Definition at line 225 of file Extension.php.
addExtension | ( | $ | extension ) |
Adds the file extensions
string | array | $extension | The extensions to add for validation |
Definition at line 151 of file Extension.php.
getCase | ( | ) |
getExtension | ( | ) |
isValid | ( | $ | value, |
$ | file = null |
||
) |
Defined by Zend_Validate_Interface
Returns true if and only if the fileextension of $value is included in the set extension list
string | $value | Real file to check for extension |
array | $file | File data from Zend_File_Transfer |
Reimplemented in Zend_Validate_File_ExcludeExtension.
Definition at line 189 of file Extension.php.
setCase | ( | $ | case ) |
Sets the case to use
boolean | $case |
Definition at line 114 of file Extension.php.
setExtension | ( | $ | extension ) |
Sets the file extensions
string | array | $extension | The extensions to validate |
Definition at line 138 of file Extension.php.
$_messageTemplates [protected] |
array( self::FALSE_EXTENSION => "The file '%value%' has a false extension", self::NOT_FOUND => "The file '%value%' was not found" )
Reimplemented from Zend_Validate_Abstract.
Definition at line 46 of file Extension.php.
$_messageVariables [protected] |
array( 'extension' => '_extension' )
Reimplemented from Zend_Validate_Abstract.
Definition at line 67 of file Extension.php.
const FALSE_EXTENSION = 'fileExtensionFalse' |
string Error constants
Reimplemented in Zend_Validate_File_ExcludeExtension.
Definition at line 40 of file Extension.php.