API Documentation

Validate/File/Extension.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
version
$Id: Extension.php 22697 2010-07-26 21:14:47Z alexander $
Classes
Zend_Validate_File_Extension

Description

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.

Zend_Validate_File_Extension

Extends from
Zend_Validate_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
Constants
FALSE_EXTENSION
NOT_FOUND
Properties
$_messageTemplates
$_extension
$_case
$_messageVariables
Methods
__construct
getCase
setCase
getExtension
setExtension
addExtension
isValid
_throw

Description

Validator for the file extension of a file

Constants

FALSE_EXTENSION

 FALSE_EXTENSION = 'fileExtensionFalse'

Details

value
fileExtensionFalse
const
string Error constants

NOT_FOUND

 NOT_FOUND = 'fileExtensionNotFound'

Details

value
fileExtensionNotFound

Properties

$_case

boolean $_case = 'false'

Validate case sensitive

Details

$_case
boolean
visibility
protected
default
false
final
false
static
false

$_extension

string $_extension = ''

Internal list of extensions

Details

$_extension
string
visibility
protected
default
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Details

$_messageTemplates
array
Error message templates
visibility
protected
default
array
final
false
static
false

$_messageVariables

array $_messageVariables = 'array'

Details

$_messageVariables
array
Error message template variables
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( string|array|Zend_Config $options ) : void

Sets validator options

Arguments
$options
stringarrayZend_Config
Details
visibility
public
final
false
static
false

_throw

_throw( string $file, string $errorType ) : false

Throws an error of the given type

Arguments
$file
string
$errorType
string
Output
false
Details
visibility
protected
final
false
static
false

addExtension

addExtension( string|array $extension ) : Zend_Validate_File_Extension

Adds the file extensions

Arguments
$extension
stringarray
The extensions to add for validation
Output
Zend_Validate_File_Extension
Provides a fluent interface
Details
visibility
public
final
false
static
false

getCase

getCase( ) : boolean

Returns the case option

Output
boolean
Details
visibility
public
final
false
static
false

getExtension

getExtension( ) : array

Returns the set file extension

Output
array
Details
visibility
public
final
false
static
false

isValid

isValid( string $value, array $file = null ) : boolean

Defined by Zend_Validate_Interface

Returns true if and only if the fileextension of $value is included in the set extension list

Arguments
$value
string
Real file to check for extension
$file
array
File data from Zend_File_Transfer
Output
boolean
Details
visibility
public
final
false
static
false

setCase

setCase( boolean $case ) : Zend_Validate_File_Extension

Sets the case to use

Arguments
$case
boolean
Output
Zend_Validate_File_Extension
Provides a fluent interface
Details
visibility
public
final
false
static
false

setExtension

setExtension( string|array $extension ) : Zend_Validate_File_Extension

Sets the file extensions

Arguments
$extension
stringarray
The extensions to validate
Output
Zend_Validate_File_Extension
Provides a fluent interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.