Form/Element/File.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Form
\Zend_Form_Element_File
- Parent(s)
- \Zend_Form_Element_Xhtml < \Zend_Form_Element
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Version
- $Id: File.php 25225 2013-01-17 15:59:16Z frosch $
Constants
DECORATOR
= 'DECORATOR'- Inherited_from
- \Zend_Form_Element::DECORATOR
- Inherited_from
- \Zend_Form_Element_Xhtml::DECORATOR
FILTER
= 'FILTER'- Inherited_from
- \Zend_Form_Element::FILTER
- Inherited_from
- \Zend_Form_Element_Xhtml::FILTER
VALIDATE
= 'VALIDATE'- Inherited_from
- \Zend_Form_Element::VALIDATE
- Inherited_from
- \Zend_Form_Element_Xhtml::VALIDATE
Properties

bool $_allowEmpty = truetrueDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_allowEmpty
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_allowEmpty

bool $_autoInsertNotEmptyValidator = truetrueDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_autoInsertNotEmptyValidator
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_autoInsertNotEmptyValidator

string $_belongsTo- Type
- string
- Inherited_from
- \Zend_Form_Element::$$_belongsTo
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_belongsTo

array $_decorators = array()array()Details- Type
- array
- Inherited_from
- \Zend_Form_Element::$$_decorators
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_decorators

string $_description- Type
- string
- Inherited_from
- \Zend_Form_Element::$$_description
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_description

bool $_disableLoadDefaultDecorators = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_disableLoadDefaultDecorators
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_disableLoadDefaultDecorators

string $_errorMessageSeparator = '; ''; 'Details- Type
- string
- Inherited_from
- \Zend_Form_Element::$$_errorMessageSeparator
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_errorMessageSeparator

array $_errorMessages = array()array()Details- Type
- array
- Inherited_from
- \Zend_Form_Element::$$_errorMessages
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_errorMessages

array $_errors = array()array()Details- Type
- array
- Inherited_from
- \Zend_Form_Element::$$_errors
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_errors

array $_filters = array()array()Details- Type
- array
- Inherited_from
- \Zend_Form_Element::$$_filters
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_filters

bool $_ignore = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_ignore
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_ignore

bool $_isArray = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_isArray
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_isArray

bool $_isError = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_isError
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_isError

bool $_isErrorForced = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_isErrorForced
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_isErrorForced

bool $_isPartialRendering = falseThis is to allow execution of logic inside the render() methods of child elements during the magic call while skipping the parent render() method.
falseDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_isPartialRendering
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_isPartialRendering

string $_label- Type
- string
- Inherited_from
- \Zend_Form_Element::$$_label
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_label

array $_loaders = array()array()Details- Type
- array
- Inherited_from
- \Zend_Form_Element::$$_loaders
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_loaders

integer $_maxFileSize = -1Maximum file size for MAX_FILE_SIZE attribut of form
-1Details- Type
- integer

array $_messages = array()array()Details- Type
- array
- Inherited_from
- \Zend_Form_Element::$$_messages
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_messages

string $_name- Type
- string
- Inherited_from
- \Zend_Form_Element::$$_name
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_name

int $_order- Type
- int
- Inherited_from
- \Zend_Form_Element::$$_order
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_order

bool $_required = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_required
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_required

\Zend_Translate $_translator- Type
- \Zend_Translate
- Inherited_from
- \Zend_Form_Element::$$_translator
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_translator

bool $_translatorDisabled = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_Form_Element::$$_translatorDisabled
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_translatorDisabled

string $_type- Type
- string
- Inherited_from
- \Zend_Form_Element::$$_type
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_type

array $_validatorRules = array()array()Details- Type
- array
- Inherited_from
- \Zend_Form_Element::$$_validatorRules
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_validatorRules

array $_validators = array()array()Details- Type
- array
- Inherited_from
- \Zend_Form_Element::$$_validators
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_validators

mixed $_value- Type
- mixed
- Inherited_from
- \Zend_Form_Element::$$_value
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_value

boolean $_valueDisabled = falseDisable value to be equal to file content
falseDetails- Type
- boolean

\Zend_View_Interface $_view- Type
- \Zend_View_Interface
- Inherited_from
- \Zend_Form_Element::$$_view
- Inherited_from
- \Zend_Form_Element_Xhtml::$$_view
Methods

__call(string $method, array $args) : stringOverloading: allow rendering specific decorators
Inherited from: \Zend_Form_Element::__call()\Zend_Form_Element_Xhtml::__call()Call renderDecoratorName() to render a specific decorator.
| Name | Type | Description |
|---|---|---|
| $method | string | |
| $args | array |
| Type | Description |
|---|---|
| string |
| Exception | Description |
|---|---|
| \Zend_Form_Exception | for invalid decorator or invalid method call |

__construct(string | array | \Zend_Config $spec, array | \Zend_Config $options = null) : voidConstructor
Inherited from: \Zend_Form_Element::__construct()\Zend_Form_Element_Xhtml::__construct()$spec may be: - string: name of element - array: options with which to configure element - Zend_Config: Zend_Config with options for configuring element
| Name | Type | Description |
|---|---|---|
| $spec | string | array | \Zend_Config | |
| $options | array | \Zend_Config |
| Exception | Description |
|---|---|
| \Zend_Form_Exception | if no element name after initialization |

__get(string $key) : mixedOverloading: retrieve object property
Inherited from: \Zend_Form_Element::__get()\Zend_Form_Element_Xhtml::__get()Prevents access to properties beginning with '_'.
| Name | Type | Description |
|---|---|---|
| $key | string |
| Type | Description |
|---|---|
| mixed |

__set(string $key, mixed $value) : \voideOverloading: set object property
Inherited from: \Zend_Form_Element::__set()\Zend_Form_Element_Xhtml::__set()| Name | Type | Description |
|---|---|---|
| $key | string | |
| $value | mixed |
| Type | Description |
|---|---|
| \voide |

__toString() : stringString representation of form element
Inherited from: \Zend_Form_Element::__toString()\Zend_Form_Element_Xhtml::__toString()Proxies to render().
| Type | Description |
|---|---|
| string |

_convertIniToInteger(string $setting) : integerConverts a ini setting to a integer value
| Name | Type | Description |
|---|---|---|
| $setting | string |
| Type | Description |
|---|---|
| integer |

_filterValue(string $value, string $key) : voidFilter a value
Inherited from: \Zend_Form_Element::_filterValue()\Zend_Form_Element_Xhtml::_filterValue()| Name | Type | Description |
|---|---|---|
| $value | string | |
| $key | string |

_getDecorator(string $name, null | array $options) : \Zend_Form_Decorator_InterfaceInstantiate a decorator based on class name or class name fragment
Inherited from: \Zend_Form_Element::_getDecorator()\Zend_Form_Element_Xhtml::_getDecorator()| Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | null | array |
| Type | Description |
|---|---|
| \Zend_Form_Decorator_Interface |

_getErrorMessages() : arrayRetrieve error messages and perform translation and value substitution
| Type | Description |
|---|---|
| array |

_hasErrorMessages() : boolAre there custom error messages registered?
Inherited from: \Zend_Form_Element::_hasErrorMessages()\Zend_Form_Element_Xhtml::_hasErrorMessages()| Type | Description |
|---|---|
| bool |

_loadDecorator(array $decorator, mixed $name) : \Zend_Form_Decorator_InterfaceLazy-load a decorator
Inherited from: \Zend_Form_Element::_loadDecorator()\Zend_Form_Element_Xhtml::_loadDecorator()| Name | Type | Description |
|---|---|---|
| $decorator | array | Decorator type and options |
| $name | mixed | Decorator name or alias |
| Type | Description |
|---|---|
| \Zend_Form_Decorator_Interface |

_loadFilter(array $filter) : \Zend_Filter_InterfaceLazy-load a filter
Inherited from: \Zend_Form_Element::_loadFilter()\Zend_Form_Element_Xhtml::_loadFilter()| Name | Type | Description |
|---|---|---|
| $filter | array |
| Type | Description |
|---|---|
| \Zend_Filter_Interface |

_loadValidator(array $validator) : \Zend_Validate_InterfaceLazy-load a validator
Inherited from: \Zend_Form_Element::_loadValidator()\Zend_Form_Element_Xhtml::_loadValidator()| Name | Type | Description |
|---|---|---|
| $validator | array | Validator definition |
| Type | Description |
|---|---|
| \Zend_Validate_Interface |

addDecorator(string | \Zend_Form_Decorator_Interface $decorator, array | \Zend_Config $options = null) : \Zend_Form_ElementAdd a decorator for rendering the element
Inherited from: \Zend_Form_Element::addDecorator()\Zend_Form_Element_Xhtml::addDecorator()| Name | Type | Description |
|---|---|---|
| $decorator | string | \Zend_Form_Decorator_Interface | |
| $options | array | \Zend_Config | Options with which to initialize decorator |
| Type | Description |
|---|---|
| \Zend_Form_Element |

addDecorators(array $decorators) : \Zend_Form_ElementAdd many decorators at once
Inherited from: \Zend_Form_Element::addDecorators()\Zend_Form_Element_Xhtml::addDecorators()| Name | Type | Description |
|---|---|---|
| $decorators | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

addError(string $message) : \Zend_Form_ElementAdd an error message and mark element as failed validation
Inherited from: \Zend_Form_Element::addError()\Zend_Form_Element_Xhtml::addError()| Name | Type | Description |
|---|---|---|
| $message | string |
| Type | Description |
|---|---|
| \Zend_Form_Element |

addErrorMessage(string $message) : \Zend_Form_ElementAdd a custom error message to return in the event of failed validation
Inherited from: \Zend_Form_Element::addErrorMessage()\Zend_Form_Element_Xhtml::addErrorMessage()| Name | Type | Description |
|---|---|---|
| $message | string |
| Type | Description |
|---|---|
| \Zend_Form_Element |

addErrorMessages(array $messages) : \Zend_Form_ElementAdd multiple custom error messages to return in the event of failed validation
Inherited from: \Zend_Form_Element::addErrorMessages()\Zend_Form_Element_Xhtml::addErrorMessages()| Name | Type | Description |
|---|---|---|
| $messages | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

addErrors(array $messages) : \Zend_Form_ElementAdd multiple error messages and flag element as failed validation
Inherited from: \Zend_Form_Element::addErrors()\Zend_Form_Element_Xhtml::addErrors()| Name | Type | Description |
|---|---|---|
| $messages | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

addFilter(string | array $filter, string | array $options = null) : \Zend_Form_Element_FileAdd Filter; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $filter | string | array | Type of filter to add |
| $options | string | array | Options to set for the filter |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

addFilters(array $filters) : \Zend_Form_Element_FileAdd Multiple filters at once; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $filters | array |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

addPrefixPath(string $prefix, string $path, string $type = null) : \Zend_Form_Element_FileAdd prefix path for plugin loader
If no $type specified, assumes it is a base path for both filters and validators, and sets each according to the following rules: - decorators: $prefix = $prefix . '_Decorator' - filters: $prefix = $prefix . '_Filter' - validators: $prefix = $prefix . '_Validate'
Otherwise, the path prefix is set on the appropriate plugin loader.
| Name | Type | Description |
|---|---|---|
| $prefix | string | |
| $path | string | |
| $type | string |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |
| Exception | Description |
|---|---|
| \Zend_Form_Exception | for invalid type |

addPrefixPaths(array $spec) : \Zend_Form_ElementAdd many prefix paths at once
Inherited from: \Zend_Form_Element::addPrefixPaths()\Zend_Form_Element_Xhtml::addPrefixPaths()| Name | Type | Description |
|---|---|---|
| $spec | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

addValidator(string | \Zend_Validate_Interface $validator, bool $breakChainOnFailure = false, mixed $options = array()) : \Zend_Form_Element_FileAdd Validator; proxy to adapter
Note: will overwrite existing validators if they are of the same class.
| Name | Type | Description |
|---|---|---|
| $validator | string | \Zend_Validate_Interface | |
| $breakChainOnFailure | bool | |
| $options | mixed |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |
| Exception | Description |
|---|---|
| \Zend_Form_Exception | if invalid validator type |

addValidators(array $validators) : \Zend_Form_Element_FileAdd multiple validators at once; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $validators | array |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

autoInsertNotEmptyValidator() : boolGet flag indicating whether a NotEmpty validator should be inserted when element is required
Inherited from: \Zend_Form_Element::autoInsertNotEmptyValidator()\Zend_Form_Element_Xhtml::autoInsertNotEmptyValidator()| Type | Description |
|---|---|
| bool |

clearDecorators() : \Zend_Form_ElementClear all decorators
Inherited from: \Zend_Form_Element::clearDecorators()\Zend_Form_Element_Xhtml::clearDecorators()| Type | Description |
|---|---|
| \Zend_Form_Element |

clearErrorMessages() : \Zend_Form_ElementClear custom error messages stack
Inherited from: \Zend_Form_Element::clearErrorMessages()\Zend_Form_Element_Xhtml::clearErrorMessages()| Type | Description |
|---|---|
| \Zend_Form_Element |

clearFilters() : \Zend_Form_Element_FileRemove all filters; proxy to adapter
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

clearValidators() : \Zend_Form_Element_FileRemove all validators; proxy to adapter
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

filterName(string $value, bool $allowBrackets = false) : stringFilter a name to only allow valid variable characters
Inherited from: \Zend_Form_Element::filterName()\Zend_Form_Element_Xhtml::filterName()| Name | Type | Description |
|---|---|---|
| $value | string | |
| $allowBrackets | bool |
| Type | Description |
|---|---|
| string |

getAllowEmpty() : boolGet 'allow empty' flag
Inherited from: \Zend_Form_Element::getAllowEmpty()\Zend_Form_Element_Xhtml::getAllowEmpty()| Type | Description |
|---|---|
| bool |

getAttrib(string $name) : stringRetrieve element attribute
Inherited from: \Zend_Form_Element::getAttrib()\Zend_Form_Element_Xhtml::getAttrib()| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| string |

getAttribs() : arrayReturn all attributes
Inherited from: \Zend_Form_Element::getAttribs()\Zend_Form_Element_Xhtml::getAttribs()| Type | Description |
|---|---|
| array |

getBelongsTo() : stringReturn array name to which element belongs
Inherited from: \Zend_Form_Element::getBelongsTo()\Zend_Form_Element_Xhtml::getBelongsTo()| Type | Description |
|---|---|
| string |

getDecorator(string $name) : false | \Zend_Form_Decorator_AbstractRetrieve a registered decorator
Inherited from: \Zend_Form_Element::getDecorator()\Zend_Form_Element_Xhtml::getDecorator()| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| false | \Zend_Form_Decorator_Abstract |

getDecorators() : arrayRetrieve all decorators
Inherited from: \Zend_Form_Element::getDecorators()\Zend_Form_Element_Xhtml::getDecorators()| Type | Description |
|---|---|
| array |

getDescription() : stringRetrieve element description
Inherited from: \Zend_Form_Element::getDescription()\Zend_Form_Element_Xhtml::getDescription()| Type | Description |
|---|---|
| string |

getErrorMessageSeparator() : stringGet errorMessageSeparator
Inherited from: \Zend_Form_Element::getErrorMessageSeparator()\Zend_Form_Element_Xhtml::getErrorMessageSeparator()| Type | Description |
|---|---|
| string |

getErrorMessages() : arrayRetrieve custom error messages
Inherited from: \Zend_Form_Element::getErrorMessages()\Zend_Form_Element_Xhtml::getErrorMessages()| Type | Description |
|---|---|
| array |

getFileInfo(string $value = null) : arrayGet internal file informations
| Name | Type | Description |
|---|---|---|
| $value | string | (Optional) Element or file to return |
| Type | Description |
|---|---|
| array |

getFileName(string $value = null, boolean $path = true) : stringGet the final filename
| Name | Type | Description |
|---|---|---|
| $value | string | (Optional) Element or file to return |
| $path | boolean | (Optional) Return also the path, defaults to true |
| Type | Description |
|---|---|
| string |

getFileSize() : string | arrayReturns the filesize for this file element
| Type | Description |
|---|---|
| string | array | Filesize |

getFilter(string $name) : \Zend_Filter_Interface | nullRetrieve individual filter; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Filter_Interface | null |

getFilters() : arrayReturns all set filters; proxy to adapter
| Type | Description |
|---|---|
| array | List of set filters |

getFullyQualifiedName() : stringGet fully qualified name
Inherited from: \Zend_Form_Element::getFullyQualifiedName()\Zend_Form_Element_Xhtml::getFullyQualifiedName()Places name as subitem of array and/or appends brackets.
| Type | Description |
|---|---|
| string |

getHash(string $hash = 'crc32') : string | arrayReturns the hash for this file element
| Name | Type | Description |
|---|---|---|
| $hash | string | (Optional) Hash algorithm to use |
| Type | Description |
|---|---|
| string | array | Hashstring |

getIgnore() : boolGet ignore flag (used when retrieving values at form level)
Inherited from: \Zend_Form_Element::getIgnore()\Zend_Form_Element_Xhtml::getIgnore()| Type | Description |
|---|---|
| bool |

getLabel() : stringRetrieve element label
Inherited from: \Zend_Form_Element::getLabel()\Zend_Form_Element_Xhtml::getLabel()| Type | Description |
|---|---|
| string |

getMessages() : arrayRetrieve error messages; proxy to transfer adapter
The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings.
If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.
| Type | Description |
|---|---|
| array |

getMimeType() : string | arrayReturns the mimetype for this file element
| Type | Description |
|---|---|
| string | array | Mimetype |

getName() : stringReturn element name
Inherited from: \Zend_Form_Element::getName()\Zend_Form_Element_Xhtml::getName()| Type | Description |
|---|---|
| string |

getOrder() : intRetrieve element order
Inherited from: \Zend_Form_Element::getOrder()\Zend_Form_Element_Xhtml::getOrder()| Type | Description |
|---|---|
| int |

getPluginLoader(string $type) : \Zend_Loader_PluginLoader_InterfaceGet Plugin Loader
Instantiates with default rules if none available for that type. Use 'decorator', 'filter', or 'validate' for $type.
| Name | Type | Description |
|---|---|---|
| $type | string |
| Type | Description |
|---|---|
| \Zend_Loader_PluginLoader_Interface |
| Exception | Description |
|---|---|
| \Zend_Loader_Exception | on invalid type. |

getTransferAdapter() : \Zend_File_Transfer_Adapter_AbstractGet transfer adapter
Lazy loads HTTP transfer adapter when no adapter registered.
| Type | Description |
|---|---|
| \Zend_File_Transfer_Adapter_Abstract |

getTranslator() : \Zend_Translate_Adapter | nullRetrieve localization translator object
| Type | Description |
|---|---|
| \Zend_Translate_Adapter | null |

getType() : stringReturn element type
Inherited from: \Zend_Form_Element::getType()\Zend_Form_Element_Xhtml::getType()| Type | Description |
|---|---|
| string |

getUnfilteredValue() : mixedRetrieve unfiltered element value
Inherited from: \Zend_Form_Element::getUnfilteredValue()\Zend_Form_Element_Xhtml::getUnfilteredValue()| Type | Description |
|---|---|
| mixed |

getValidator(string $name) : \Zend_Validate_Interface | nullRetrieve validator by name; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Validate_Interface | null |

getValue() : null | stringProcesses the file, returns null or the filename only For the complete path, use getFileName
| Type | Description |
|---|---|
| null | string |

getView() : null | \Zend_View_InterfaceRetrieve view object
Inherited from: \Zend_Form_Element::getView()\Zend_Form_Element_Xhtml::getView()Retrieves from ViewRenderer if none previously set.
| Type | Description |
|---|---|
| null | \Zend_View_Interface |

hasTranslator() : boolDoes this element have its own specific translator?
Inherited from: \Zend_Form_Element::hasTranslator()\Zend_Form_Element_Xhtml::hasTranslator()| Type | Description |
|---|---|
| bool |

init() : voidInitialize object; used by extending classes
Inherited from: \Zend_Form_Element::init()\Zend_Form_Element_Xhtml::init()
isArray() : boolIs the element representing an array?
Inherited from: \Zend_Form_Element::isArray()\Zend_Form_Element_Xhtml::isArray()| Type | Description |
|---|---|
| bool |

isRequired() : boolIs the element required?
Inherited from: \Zend_Form_Element::isRequired()\Zend_Form_Element_Xhtml::isRequired()| Type | Description |
|---|---|
| bool |

isValid(string $value, mixed $context = null) : boolValidate upload
If a translation adapter is registered, any error messages will be translated according to the current locale, using the given error code; if no matching translation is found, the original message will be utilized.
Note: The filtered value is validated.
| Name | Type | Description |
|---|---|---|
| $value | string | File, can be optional, give null to validate all files |
| $context | mixed |
| Type | Description |
|---|---|
| bool |
| Exception | Description |
|---|---|
| \Zend_Validate_Exception | If validation of $value is impossible |

isValueDisabled() : booleanReturns if the file will be uploaded when calling getValues()
| Type | Description |
|---|---|
| boolean | Receive the file on calling getValues()? |

loadDefaultDecorators() : \Zend_Form_Element_FileLoad default decorators
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

loadDefaultDecoratorsIsDisabled() : boolShould we load the default decorators?
Inherited from: \Zend_Form_Element::loadDefaultDecoratorsIsDisabled()\Zend_Form_Element_Xhtml::loadDefaultDecoratorsIsDisabled()| Type | Description |
|---|---|
| bool |

markAsError() : \Zend_Form_ElementMark the element as being in a failed validation state
Inherited from: \Zend_Form_Element::markAsError()\Zend_Form_Element_Xhtml::markAsError()| Type | Description |
|---|---|
| \Zend_Form_Element |

removeDecorator(string $name) : \Zend_Form_ElementRemove a single decorator
Inherited from: \Zend_Form_Element::removeDecorator()\Zend_Form_Element_Xhtml::removeDecorator()| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Form_Element |

removeFilter(string $name) : \Zend_Form_Element_FileRemove an individual filter; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

removeValidator(string $name) : \Zend_Form_Element_FileRemove validator by name; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

render(\Zend_View_Interface $view = null) : stringRender form element Checks for decorator interface to prevent errors
| Name | Type | Description |
|---|---|---|
| $view | \Zend_View_Interface |
| Type | Description |
|---|---|
| string |

resolveElementId(\Zend_Form_Decorator_Interface $decorator) : stringUsed to resolve and return an element ID
Inherited from: \Zend_Form_Element::resolveElementId()\Zend_Form_Element_Xhtml::resolveElementId()Passed to the HtmlTag decorator as a callback in order to provide an ID.
| Name | Type | Description |
|---|---|---|
| $decorator | \Zend_Form_Decorator_Interface |
| Type | Description |
|---|---|
| string |

setAllowEmpty(bool $flag) : \Zend_Form_ElementSet 'allow empty' flag
Inherited from: \Zend_Form_Element::setAllowEmpty()\Zend_Form_Element_Xhtml::setAllowEmpty()When the allow empty flag is enabled and the required flag is false, the element will validate with empty values.
| Name | Type | Description |
|---|---|---|
| $flag | bool |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setAttrib(string $name, mixed $value) : \Zend_Form_ElementSet element attribute
Inherited from: \Zend_Form_Element::setAttrib()\Zend_Form_Element_Xhtml::setAttrib()| Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed |
| Type | Description |
|---|---|
| \Zend_Form_Element |
| Exception | Description |
|---|---|
| \Zend_Form_Exception | for invalid $name values |

setAttribs(array $attribs) : \Zend_Form_ElementSet multiple attributes at once
Inherited from: \Zend_Form_Element::setAttribs()\Zend_Form_Element_Xhtml::setAttribs()| Name | Type | Description |
|---|---|---|
| $attribs | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setAutoInsertNotEmptyValidator(bool $flag) : \Zend_Form_ElementSet flag indicating whether a NotEmpty validator should be inserted when element is required
Inherited from: \Zend_Form_Element::setAutoInsertNotEmptyValidator()\Zend_Form_Element_Xhtml::setAutoInsertNotEmptyValidator()| Name | Type | Description |
|---|---|---|
| $flag | bool |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setBelongsTo(string $array) : \Zend_Form_ElementSet array to which element belongs
Inherited from: \Zend_Form_Element::setBelongsTo()\Zend_Form_Element_Xhtml::setBelongsTo()| Name | Type | Description |
|---|---|---|
| $array | string |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setConfig(\Zend_Config $config) : \Zend_Form_ElementSet object state from Zend_Config object
Inherited from: \Zend_Form_Element::setConfig()\Zend_Form_Element_Xhtml::setConfig()| Name | Type | Description |
|---|---|---|
| $config | \Zend_Config |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setDecorators(array $decorators) : \Zend_Form_ElementOverwrite all decorators
Inherited from: \Zend_Form_Element::setDecorators()\Zend_Form_Element_Xhtml::setDecorators()| Name | Type | Description |
|---|---|---|
| $decorators | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setDescription(string $description) : \Zend_Form_ElementSet element description
Inherited from: \Zend_Form_Element::setDescription()\Zend_Form_Element_Xhtml::setDescription()| Name | Type | Description |
|---|---|---|
| $description | string |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setDestination(string $path) : \Zend_Form_Element_FileSet the upload destination
| Name | Type | Description |
|---|---|---|
| $path | string |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

setDisableLoadDefaultDecorators(bool $flag) : \Zend_Form_ElementSet flag to disable loading default decorators
Inherited from: \Zend_Form_Element::setDisableLoadDefaultDecorators()\Zend_Form_Element_Xhtml::setDisableLoadDefaultDecorators()| Name | Type | Description |
|---|---|---|
| $flag | bool |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setDisableTranslator(bool $flag) : \Zend_Form_Element_FileIndicate whether or not translation should be disabled
| Name | Type | Description |
|---|---|---|
| $flag | bool |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

setErrorMessageSeparator(string $separator) : \Zend_Form_ElementSet errorMessageSeparator
Inherited from: \Zend_Form_Element::setErrorMessageSeparator()\Zend_Form_Element_Xhtml::setErrorMessageSeparator()| Name | Type | Description |
|---|---|---|
| $separator | string |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setErrorMessages(array $messages) : \Zend_Form_ElementSame as addErrorMessages(), but clears custom error message stack first
Inherited from: \Zend_Form_Element::setErrorMessages()\Zend_Form_Element_Xhtml::setErrorMessages()| Name | Type | Description |
|---|---|---|
| $messages | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setErrors(array $messages) : \Zend_Form_ElementOverwrite any previously set error messages and flag as failed validation
Inherited from: \Zend_Form_Element::setErrors()\Zend_Form_Element_Xhtml::setErrors()| Name | Type | Description |
|---|---|---|
| $messages | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setFilters( $filters) : \Zend_Form_Element_FileSets a filter for the class, erasing all previous set; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $filters |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

setIgnore(bool $flag) : \Zend_Form_ElementSet ignore flag (used when retrieving values at form level)
Inherited from: \Zend_Form_Element::setIgnore()\Zend_Form_Element_Xhtml::setIgnore()| Name | Type | Description |
|---|---|---|
| $flag | bool |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setIsArray(bool $flag) : \Zend_Form_ElementSet flag indicating if element represents an array
Inherited from: \Zend_Form_Element::setIsArray()\Zend_Form_Element_Xhtml::setIsArray()| Name | Type | Description |
|---|---|---|
| $flag | bool |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setLabel(string $label) : \Zend_Form_ElementSet element label
Inherited from: \Zend_Form_Element::setLabel()\Zend_Form_Element_Xhtml::setLabel()| Name | Type | Description |
|---|---|---|
| $label | string |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setMaxFileSize(integer $size) : integerSets the maximum file size of the form
| Name | Type | Description |
|---|---|---|
| $size | integer |
| Type | Description |
|---|---|
| integer |

setMultiFile(integer $count) : \Zend_Form_Element_FileSet a multifile element
| Name | Type | Description |
|---|---|---|
| $count | integer | Number of file elements |
| Type | Description |
|---|---|
| \Zend_Form_Element_File | Provides fluent interface |

setName(string $name) : \Zend_Form_ElementSet element name
Inherited from: \Zend_Form_Element::setName()\Zend_Form_Element_Xhtml::setName()| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setOptions(array $options) : \Zend_Form_ElementSet object state from options array
Inherited from: \Zend_Form_Element::setOptions()\Zend_Form_Element_Xhtml::setOptions()| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setOrder(int $order) : \Zend_Form_ElementSet element order
Inherited from: \Zend_Form_Element::setOrder()\Zend_Form_Element_Xhtml::setOrder()| Name | Type | Description |
|---|---|---|
| $order | int |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setPluginLoader(\Zend_Loader_PluginLoader_Interface $loader, string $type) : \Zend_Form_Element_FileSet plugin loader
| Name | Type | Description |
|---|---|---|
| $loader | \Zend_Loader_PluginLoader_Interface | |
| $type | string |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |
| Exception | Description |
|---|---|
| \Zend_Form_Exception | on invalid type |

setRequired(bool $flag = true) : \Zend_Form_ElementSet required flag
Inherited from: \Zend_Form_Element::setRequired()\Zend_Form_Element_Xhtml::setRequired()| Name | Type | Description |
|---|---|---|
| $flag | bool | Default value is true |
| Type | Description |
|---|---|
| \Zend_Form_Element |

setTransferAdapter(string | \Zend_File_Transfer_Adapter_Abstract $adapter) : \Zend_Form_Element_FileSet transfer adapter
| Name | Type | Description |
|---|---|---|
| $adapter | string | \Zend_File_Transfer_Adapter_Abstract |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

setTranslator(\Zend_Translate | null $translator = null) : \Zend_Form_Element_FileSet translator object for localization
| Name | Type | Description |
|---|---|---|
| $translator | \Zend_Translate | null |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

setValidators(array $validators) : \Zend_Form_Element_FileAdd multiple validators at once, overwriting; proxy to adapter
| Name | Type | Description |
|---|---|---|
| $validators | array |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

setValue(mixed $value) : \Zend_Form_Element_FileDisallow setting the value
| Name | Type | Description |
|---|---|---|
| $value | mixed |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

setValueDisabled(boolean $flag) : \Zend_Form_Element_FileSet if the file will be uploaded when getting the value This defaults to false which will force receive() when calling getValues()
| Name | Type | Description |
|---|---|---|
| $flag | boolean | Sets if the file is handled as the elements value |
| Type | Description |
|---|---|
| \Zend_Form_Element_File |

setView(\Zend_View_Interface $view = null) : \Zend_Form_ElementSet view object
Inherited from: \Zend_Form_Element::setView()\Zend_Form_Element_Xhtml::setView()| Name | Type | Description |
|---|---|---|
| $view | \Zend_View_Interface |
| Type | Description |
|---|---|
| \Zend_Form_Element |