Zend_Form_Element
category | Zend |
---|---|
package | Zend_Form |
subpackage | Element |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
version | $Id$ |
inherited_from | \Zend_Form_Element_Xhtml |
__call(string $method, array $args) : string
Call renderDecoratorName() to render a specific decorator.
string
array
\Zend_Form_Exception |
for invalid decorator or invalid method call |
---|
string
__construct(string|array|\Zend_Config $spec, array|\Zend_Config $options = null
) : void
$spec may be:
string
array
\Zend_Config
array
\Zend_Config
\Zend_Form_Exception |
if no element name after initialization |
---|
__get(string $key) : mixed
Prevents access to properties beginning with '_'.
string
mixed
__set(string $key, mixed $value) : \voide
string
mixed
\voide
__toString() : string
Proxies to \render().
string
addDecorator(string|\Zend_Form_Decorator_Interface $decorator, array|\Zend_Config $options = null
) : \Zend_Form_Element
string
\Zend_Form_Decorator_Interface
array
\Zend_Config
Options with which to initialize decorator
\Zend_Form_Element
addDecorators(array $decorators) : \Zend_Form_Element
array
\Zend_Form_Element
addError(string $message) : \Zend_Form_Element
string
\Zend_Form_Element
addErrorMessage(string $message) : \Zend_Form_Element
string
\Zend_Form_Element
addErrorMessages(array $messages) : \Zend_Form_Element
array
\Zend_Form_Element
addErrors(array $messages) : \Zend_Form_Element
array
\Zend_Form_Element
addFilter(string|array $filter, string|array $options = null
) : \Zend_Form_Element_File
string
array
Type of filter to add
string
array
Options to set for the filter
\Zend_Form_Element_File
addFilter(string|\Zend_Filter_Interface $filter, $options = array()
) : \Zend_Form_Element
string
\Zend_Filter_Interface
\Zend_Form_Element
addFilters(array $filters) : \Zend_Form_Element_File
array
\Zend_Form_Element_File
addFilters(array $filters) : \Zend_Form_Element
array
\Zend_Form_Element
addPrefixPath(string $prefix, string $path, string $type = null
) : \Zend_Form_Element_File
string
string
string
\Zend_Form_Element_File
addPrefixPath(string $prefix, string $path, string $type = null
) : \Zend_Form_Element
If no $type specified, assumes it is a base path for both filters and validators, and sets each according to the following rules:
Otherwise, the path prefix is set on the appropriate plugin loader.
string
string
string
\Zend_Form_Exception |
for invalid type |
---|
\Zend_Form_Element
addPrefixPaths(array $spec) : \Zend_Form_Element
array
\Zend_Form_Element
addValidator(string|\Zend_Validate_Interface $validator, boolean $breakChainOnFailure= false
, mixed $options= array()
) : \Zend_Form_Element_File
string
\Zend_Validate_Interface
boolean
mixed
\Zend_Form_Element_File
addValidator(string|\Zend_Validate_Interface $validator, boolean $breakChainOnFailure= false
, array $options= array()
) : \Zend_Form_Element
Note: will overwrite existing validators if they are of the same class.
string
\Zend_Validate_Interface
boolean
array
\Zend_Form_Exception |
if invalid validator type |
---|
\Zend_Form_Element
addValidators(array $validators) : \Zend_Form_Element_File
array
\Zend_Form_Element_File
addValidators(array $validators) : \Zend_Form_Element
array
\Zend_Form_Element
autoInsertNotEmptyValidator() : boolean
boolean
clearDecorators() : \Zend_Form_Element
\Zend_Form_Element
clearErrorMessages() : \Zend_Form_Element
\Zend_Form_Element
clearFilters() : \Zend_Form_Element_File
\Zend_Form_Element_File
clearFilters() : \Zend_Form_Element
\Zend_Form_Element
clearValidators() : \Zend_Form_Element_File
\Zend_Form_Element_File
clearValidators() : \Zend_Form_Element
\Zend_Form_Element
filterName(string $value, boolean $allowBrackets = false
) : string
string
boolean
string
getAllowEmpty() : boolean
boolean
getAttrib(string $name) : string
string
string
getAttribs() : array
array
getBelongsTo() : string
string
getConcatJustValuesInErrorMessage() : boolean
boolean
getDecorator(string $name) : false | \Zend_Form_Decorator_Abstract
string
false
\Zend_Form_Decorator_Abstract
getDecorators() : array
array
getDescription() : string
string
getDestination() : string
string
getErrorMessageSeparator() : string
string
getErrorMessages() : array
array
getErrors() : array
array
getErrors() : array
array
getFileInfo(string $value = null
) : array
string
(Optional) Element or file to return
array
getFileName(string $value= null
, boolean $path= true
) : string
string
(Optional) Element or file to return
boolean
(Optional) Return also the path, defaults to true
string
getFileSize() : string | array
string
array
FilesizegetFilter(string $name) : \Zend_Filter_Interface | null
string
\Zend_Filter_Interface
null
getFilter(string $name) : \Zend_Filter_Interface
string
\Zend_Filter_Interface
getFilters() : array
array
List of set filtersgetFilters() : array
array
getFullyQualifiedName() : string
Places name as subitem of array and/or appends brackets.
string
getHash(string $hash = 'crc32'
) : string | array
string
(Optional) Hash algorithm to use
string
array
HashstringgetId() : string
string
getIgnore() : boolean
boolean
getLabel() : string
string
getMaxFileSize() : integer
integer
getMessages() : array
array
getMessages() : array
If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.
inherited_from | \Zend_Validate_Interface::getMessages() |
---|
array
getMimeType() : string | array
string
array
MimetypegetMultiFile() : integer
integer
getName() : string
string
getOrder() : integer
integer
getPluginLoader(string $type) : \Zend_Loader_PluginLoader_Interface
string
\Zend_Loader_PluginLoader_Interface
getPluginLoader(string $type) : \Zend_Loader_PluginLoader
Instantiates with default rules if none available for that type. Use 'decorator', 'filter', or 'validate' for $type.
string
\Zend_Loader_Exception |
on invalid type. |
---|
\Zend_Loader_PluginLoader
getTransferAdapter() : \Zend_File_Transfer_Adapter_Abstract
Lazy loads HTTP transfer adapter when no adapter registered.
\Zend_File_Transfer_Adapter_Abstract
getTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
getTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
getType() : string
string
getUnfilteredValue() : mixed
mixed
getValidator(string $name) : \Zend_Validate_Interface | null
string
\Zend_Validate_Interface
null
getValidator(string $name) : \Zend_Validate_Interface | false
string
\Zend_Validate_Interface
false
False if not found, validator otherwisegetValidators() : array
array
getValidators() : array
array
getValue() : null | string
null
string
getValue() : mixed
mixed
getView() : null | \Zend_View_Interface
Retrieves from ViewRenderer if none previously set.
null
\Zend_View_Interface
hasErrors() : boolean
boolean
hasErrors() : boolean
boolean
hasTranslator() : boolean
boolean
init() : void
isArray() : boolean
boolean
isFiltered() : boolean
boolean
isReceived() : boolean
boolean
isRequired() : boolean
boolean
isUploaded() : boolean
boolean
isValid(string $value, mixed $context = null
) : boolean
string
File, can be optional, give null to validate all files
mixed
boolean
isValid(mixed $value, mixed $context = null
) : boolean
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.
inherited_from | \Zend_Validate_Interface::isValid() |
---|
mixed
mixed
boolean
isValueDisabled() : boolean
boolean
Receive the file on calling getValues()?loadDefaultDecorators() : \Zend_Form_Element_File
\Zend_Form_Element_File
loadDefaultDecorators() : \Zend_Form_Element
\Zend_Form_Element
loadDefaultDecoratorsIsDisabled() : boolean
boolean
markAsError() : \Zend_Form_Element
\Zend_Form_Element
receive() : boolean
boolean
removeDecorator(string $name) : \Zend_Form_Element
string
\Zend_Form_Element
removeFilter(string $name) : \Zend_Form_Element_File
string
\Zend_Form_Element_File
removeFilter(string $name) : \Zend_Form_Element
string
\Zend_Form_Element
removeValidator(string $name) : \Zend_Form_Element_File
string
\Zend_Form_Element_File
removeValidator(string $name) : boolean
string
boolean
render(\Zend_View_Interface $view = null
) : string
\Zend_View_Interface
\Zend_Form_Element_Exception |
---|
string
render(\Zend_View_Interface $view = null
) : string
\Zend_View_Interface
string
resolveElementId(\Zend_Form_Decorator_Interface $decorator) : string
Passed to the HtmlTag decorator as a callback in order to provide an ID.
\Zend_Form_Decorator_Interface
string
setAllowEmpty(boolean $flag) : \Zend_Form_Element
When the allow empty flag is enabled and the required flag is false, the element will validate with empty values.
boolean
\Zend_Form_Element
setAttrib(string $name, mixed $value) : \Zend_Form_Element
string
mixed
\Zend_Form_Exception |
for invalid $name values |
---|
\Zend_Form_Element
setAttribs(array $attribs) : \Zend_Form_Element
array
\Zend_Form_Element
setAutoInsertNotEmptyValidator(boolean $flag) : \Zend_Form_Element
boolean
\Zend_Form_Element
setBelongsTo(string $array) : \Zend_Form_Element
string
\Zend_Form_Element
setConcatJustValuesInErrorMessage(boolean $concatJustValuesInErrorMessage) : \Zend_Form_Element
boolean
\Zend_Form_Element
setConfig(\Zend_Config $config) : \Zend_Form_Element
\Zend_Config
\Zend_Form_Element
setDecorators(array $decorators) : \Zend_Form_Element
array
\Zend_Form_Element
setDescription(string $description) : \Zend_Form_Element
string
\Zend_Form_Element
setDestination(string $path) : \Zend_Form_Element_File
string
\Zend_Form_Element_File
setDisableLoadDefaultDecorators(boolean $flag) : \Zend_Form_Element
boolean
\Zend_Form_Element
setDisableTranslator(boolean $flag) : \Zend_Form_Element_File
boolean
\Zend_Form_Element_File
setDisableTranslator(boolean $flag) : \Zend_Form_Element
boolean
\Zend_Form_Element
setErrorMessageSeparator(string $separator) : \Zend_Form_Element
string
\Zend_Form_Element
setErrorMessages(array $messages) : \Zend_Form_Element
array
\Zend_Form_Element
setErrors(array $messages) : \Zend_Form_Element
array
\Zend_Form_Element
setFilters(array $filters) : \Zend_Form_Element_File
array
Filters to set
\Zend_Form_Element_File
setFilters(array $filters) : \Zend_Form_Element
array
\Zend_Form_Element
setIgnore(boolean $flag) : \Zend_Form_Element
boolean
\Zend_Form_Element
setIsArray(boolean $flag) : \Zend_Form_Element
boolean
\Zend_Form_Element
setLabel(string $label) : \Zend_Form_Element
string
\Zend_Form_Element
setMaxFileSize(integer $size) : integer
integer
integer
setMultiFile(integer $count) : \Zend_Form_Element_File
integer
Number of file elements
\Zend_Form_Element_File
Provides fluent interfacesetName(string $name) : \Zend_Form_Element
string
\Zend_Form_Element
setOptions(array $options) : \Zend_Form_Element
array
\Zend_Form_Element
setOrder(integer $order) : \Zend_Form_Element
integer
\Zend_Form_Element
setPluginLoader(\Zend_Loader_PluginLoader_Interface $loader, string $type) : \Zend_Form_Element_File
\Zend_Loader_PluginLoader_Interface
string
\Zend_Form_Element_File
setPluginLoader(\Zend_Loader_PluginLoader_Interface $loader, string $type) : \Zend_Form_Element
\Zend_Loader_PluginLoader_Interface
string
'decorator', 'filter', or 'validate'
\Zend_Form_Exception |
on invalid type |
---|
\Zend_Form_Element
setRequired(boolean $flag = true
) : \Zend_Form_Element
boolean
Default value is true
\Zend_Form_Element
setTransferAdapter(string|\Zend_File_Transfer_Adapter_Abstract $adapter) : \Zend_Form_Element_File
string
\Zend_File_Transfer_Adapter_Abstract
\Zend_Form_Element_Exception |
---|
\Zend_Form_Element_File
setTranslator(\Zend_Translate|null $translator = null
) : \Zend_Form_Element_File
\Zend_Translate
null
\Zend_Form_Element_File
setTranslator(\Zend_Translate|null $translator = null
) : \Zend_Form_Element
\Zend_Translate
null
\Zend_Form_Element
setValidators(array $validators) : \Zend_Form_Element_File
array
\Zend_Form_Element_File
setValidators(array $validators) : \Zend_Form_Element
array
\Zend_Form_Element
setValue(mixed $value) : \Zend_Form_Element_File
mixed
\Zend_Form_Element_File
setValue(mixed $value) : \Zend_Form_Element
mixed
\Zend_Form_Element
setValueDisabled(boolean $flag) : \Zend_Form_Element_File
boolean
Sets if the file is handled as the elements value
\Zend_Form_Element_File
setView(\Zend_View_Interface $view = null
) : \Zend_Form_Element
\Zend_View_Interface
\Zend_Form_Element
translatorIsDisabled() : boolean
boolean
translatorIsDisabled() : boolean
boolean
_filterValue(string $value, string $key) : void
string
string
_getDecorator(string $name, null|array $options) : \Zend_Form_Decorator_Interface
string
null
array
\Zend_Form_Decorator_Interface
_getErrorMessages() : array
array
_getErrorMessages() : array
array
_hasErrorMessages() : boolean
boolean
_loadDecorator(array $decorator, mixed $name) : \Zend_Form_Decorator_Interface
array
Decorator type and options
mixed
Decorator name or alias
\Zend_Form_Decorator_Interface
_loadFilter(array $filter) : \Zend_Filter_Interface
array
\Zend_Filter_Interface
_loadValidator(array $validator) : \Zend_Validate_Interface
array
Validator definition
\Zend_Validate_Interface
_convertIniToInteger(string $setting) : integer
string
integer
$helper : string
'formFile'
$helper : string
'formText'
$_adapter : \Zend_File_Transfer_Adapter_Abstract
$_allowEmpty : boolean
true
$_autoInsertNotEmptyValidator : boolean
true
$_belongsTo : string
$_concatJustValuesInErrorMessage : boolean
false
$_counter : integer
1
$_decorators : array
array()
$_description : string
$_disableLoadDefaultDecorators : boolean
false
$_errorMessageSeparator : string
'; '
$_errorMessages : array
array()
$_errors : array
array()
$_filters : array
array()
$_ignore : boolean
false
$_isArray : boolean
false
$_isError : boolean
false
$_isErrorForced : boolean
false
$_isPartialRendering : boolean
false
This is to allow execution of logic inside the render() methods of child elements during the magic call while skipping the parent render() method.
$_label : string
$_loaders : array
array()
$_maxFileSize : integer
-1
$_name : string
$_order : integer
$_required : boolean
false
$_translator : \Zend_Translate
$_translatorDisabled : boolean
false
$_type : string
$_validated : boolean
false
$_validatorRules : array
array()
$_validators : array
array()
$_value : mixed
$_valueDisabled : boolean
false
$_view : \Zend_View_Interface
DECORATOR = 'DECORATOR'
FILTER = 'FILTER'
TRANSFER_ADAPTER = 'TRANSFER_ADAPTER'
VALIDATE = 'VALIDATE'