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_Form_Element

integer
$_maxFileSize= '-1'
-1
Details
boolean
$_valueDisabled= 'false'
false
Details
_convertIniToInteger(
string $setting
)
:
integer
Converts a ini setting to a integer value
Name | Type | Description |
---|---|---|
$setting | string |
Type | Description |
---|---|
integer |

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

addFilter(
string|array $filter, string|array $options
=
null
)
:
\Zend_Form_Element_File
Add 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_File
Add Multiple filters at once; proxy to adapter

addPrefixPath(
string $prefix, string $path, string $type
=
null
)
:
\Zend_Form_Element_File
Add prefix path for plugin loader
Name | Type | Description |
---|---|---|
$prefix | string | |
$path | string | |
$type | string |
Type | Description |
---|---|
\Zend_Form_Element_File |

addValidator(
string|\Zend_Validate_Interface $validator, bool $breakChainOnFailure
=
false, mixed $options
=
array()
)
:
\Zend_Form_Element_File
Add Validator; proxy to adapter
Name | Type | Description |
---|---|---|
$validator | string|\Zend_Validate_Interface | |
$breakChainOnFailure | bool | |
$options | mixed |
Type | Description |
---|---|
\Zend_Form_Element_File |

addValidators(
array $validators
)
:
\Zend_Form_Element_File
Add multiple validators at once; proxy to adapter

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

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

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

getFileName(
string $value
=
null, boolean $path
=
true
)
:
string
Get 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|array
Returns the filesize for this file element
Type | Description |
---|---|
string|array | Filesize |

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

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

getMessages(
)
:
array
Retrieve error messages; proxy to transfer adapter
Type | Description |
---|---|
array |

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

getPluginLoader(
string $type
)
:
\Zend_Loader_PluginLoader_Interface
Get Plugin Loader
Name | Type | Description |
---|---|---|
$type | string |
Type | Description |
---|---|
\Zend_Loader_PluginLoader_Interface |

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

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

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

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

isValid(
string $value, mixed $context
=
null
)
:
bool
Validate upload
Name | Type | Description |
---|---|---|
$value | string | File, can be optional, give null to validate all files |
$context | mixed |
Type | Description |
---|---|
bool |

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

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

render(
\Zend_View_Interface $view
=
null
)
:
string
Render form element Checks for decorator interface to prevent errors

setDisableTranslator(
bool $flag
)
:
\Zend_Form_Element_File
Indicate whether or not translation should be disabled

setFilters(
$filters
)
:
\Zend_Form_Element_File
Sets a filter for the class, erasing all previous set; proxy to adapter

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

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

setPluginLoader(
\Zend_Loader_PluginLoader_Interface $loader, string $type
)
:
\Zend_Form_Element_File
Set plugin loader
Name | Type | Description |
---|---|---|
$loader | \Zend_Loader_PluginLoader_Interface | |
$type | string |
Type | Description |
---|---|
\Zend_Form_Element_File |

setTransferAdapter(
string|\Zend_File_Transfer_Adapter_Abstract $adapter
)
:
\Zend_Form_Element_File
Set 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_File
Set translator object for localization
Name | Type | Description |
---|---|---|
$translator | \Zend_Translate|null |
Type | Description |
---|---|
\Zend_Form_Element_File |

setValidators(
array $validators
)
:
\Zend_Form_Element_File
Add multiple validators at once, overwriting; proxy to adapter

setValueDisabled(
boolean $flag
)
:
\Zend_Form_Element_File
Set 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 |