Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Validator for the file extension of a file
FALSE_EXTENSION = 'fileExtensionFalse'
Details NOT_FOUND = 'fileExtensionNotFound'
Detailsboolean $_case = 'false'Validate case sensitive
Detailsstring $_extension = ''Internal list of extensions
Detailsarray $_messageTemplates = 'array'
Detailsarray $_messageVariables = 'array'
Details__construct(
string|array|Zend_Config $options
)
:
voidSets validator options
Details_throw(
string $file, string $errorType
)
:
falseThrows an error of the given type
DetailsaddExtension(
string|array $extension
)
:
Zend_Validate_File_ExtensionAdds the file extensions
DetailsgetCase(
)
:
booleanReturns the case option
DetailsgetExtension(
)
:
arrayReturns the set file extension
DetailsisValid(
string $value, array $file
=
null
)
:
booleanDefined by Zend_Validate_Interface
Returns true if and only if the fileextension of $value is included in the set extension list
DetailssetCase(
boolean $case
)
:
Zend_Validate_File_ExtensionSets the case to use
DetailssetExtension(
string|array $extension
)
:
Zend_Validate_File_ExtensionSets the file extensions
Details