|
Moodle
2.2.1
http://www.collinsharper.com
|


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 223 of file Extension.php.


| addExtension | ( | $ | extension | ) |
Adds the file extensions
| string | array | $extension | The extensions to add for validation |
Definition at line 149 of file Extension.php.


| getCase | ( | ) |
Returns the case option
Definition at line 101 of file Extension.php.

| getExtension | ( | ) |
Returns the set file extension
Definition at line 123 of file Extension.php.

| 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 187 of file Extension.php.

| setCase | ( | $ | case | ) |
Sets the case to use
| boolean | $case |
Definition at line 112 of file Extension.php.

| setExtension | ( | $ | extension | ) |
Sets the file extensions
| string | array | $extension | The extensions to validate |
Definition at line 136 of file Extension.php.


$_case = false [protected] |
Definition at line 62 of file Extension.php.
$_extension = '' [protected] |
Definition at line 55 of file Extension.php.
$_messageTemplates [protected] |
array( self::FALSE_EXTENSION => "File '%value%' has a false extension", self::NOT_FOUND => "File '%value%' could not be found", )
Reimplemented from Zend_Validate_Abstract.
Reimplemented in Zend_Validate_File_ExcludeExtension.
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.
| const NOT_FOUND = 'fileExtensionNotFound' |
Reimplemented in Zend_Validate_File_ExcludeExtension.
Definition at line 41 of file Extension.php.