Moodle  2.2.1
http://www.collinsharper.com
Zend_Validate_File_Extension Class Reference
Inheritance diagram for Zend_Validate_File_Extension:
Collaboration diagram for Zend_Validate_File_Extension:

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

Detailed Description

Definition at line 35 of file Extension.php.


Constructor & Destructor Documentation

__construct ( options)

Sets validator options

Parameters:
string | array | Zend_Config$options
Returns:
void

Definition at line 77 of file Extension.php.

Here is the call graph for this function:


Member Function Documentation

_throw ( file,
errorType 
) [protected]

Throws an error of the given type

Parameters:
string$file
string$errorType
Returns:
false

Definition at line 223 of file Extension.php.

Here is the call graph for this function:

Here is the caller graph for this function:

addExtension ( extension)

Adds the file extensions

Parameters:
string | array$extensionThe extensions to add for validation
Returns:
Zend_Validate_File_Extension Provides a fluent interface

Definition at line 149 of file Extension.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getCase ( )

Returns the case option

Returns:
boolean

Definition at line 101 of file Extension.php.

Here is the caller graph for this function:

Returns the set file extension

Returns:
array

Definition at line 123 of file Extension.php.

Here is the caller graph for this function:

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

Parameters:
string$valueReal file to check for extension
array$fileFile data from Zend_File_Transfer
Returns:
boolean

Reimplemented in Zend_Validate_File_ExcludeExtension.

Definition at line 187 of file Extension.php.

Here is the call graph for this function:

setCase ( case)

Sets the case to use

Parameters:
boolean$case
Returns:
Zend_Validate_File_Extension Provides a fluent interface

Definition at line 112 of file Extension.php.

Here is the caller graph for this function:

setExtension ( extension)

Sets the file extensions

Parameters:
string | array$extensionThe extensions to validate
Returns:
Zend_Validate_File_Extension Provides a fluent interface

Definition at line 136 of file Extension.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_case = false [protected]

Definition at line 62 of file Extension.php.

$_extension = '' [protected]

Definition at line 55 of file Extension.php.

$_messageTemplates [protected]
Initial value:
 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]
Initial value:
 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.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations