Zend Framework
1.12
|
Public Member Functions | |
loadDefaultDecorators () | |
Load default decorators. | |
setPluginLoader (Zend_Loader_PluginLoader_Interface $loader, $type) | |
Set plugin loader. | |
getPluginLoader ($type) | |
Get Plugin Loader. | |
addPrefixPath ($prefix, $path, $type=null) | |
Add prefix path for plugin loader. | |
setTransferAdapter ($adapter) | |
Set transfer adapter. | |
getTransferAdapter () | |
Get transfer adapter. | |
addValidator ($validator, $breakChainOnFailure=false, $options=array()) | |
Add Validator; proxy to adapter. | |
addValidators (array $validators) | |
Add multiple validators at once; proxy to adapter. | |
setValidators (array $validators) | |
Add multiple validators at once, overwriting; proxy to adapter. | |
getValidator ($name) | |
Retrieve validator by name; proxy to adapter. | |
getValidators () | |
Retrieve all validators; proxy to adapter. | |
removeValidator ($name) | |
Remove validator by name; proxy to adapter. | |
clearValidators () | |
Remove all validators; proxy to adapter. | |
addFilter ($filter, $options=null) | |
Add Filter; proxy to adapter. | |
addFilters (array $filters) | |
Add Multiple filters at once; proxy to adapter. | |
setFilters (array $filters) | |
Sets a filter for the class, erasing all previous set; proxy to adapter. | |
getFilter ($name) | |
Retrieve individual filter; proxy to adapter. | |
getFilters () | |
Returns all set filters; proxy to adapter. | |
removeFilter ($name) | |
Remove an individual filter; proxy to adapter. | |
clearFilters () | |
Remove all filters; proxy to adapter. | |
isValid ($value, $context=null) | |
Validate upload. | |
receive () | |
Receive the uploaded file. | |
getErrors () | |
Retrieve error codes; proxy to transfer adapter. | |
hasErrors () | |
Are there errors registered? | |
getMessages () | |
Retrieve error messages; proxy to transfer adapter. | |
setDestination ($path) | |
Set the upload destination. | |
getDestination () | |
Get the upload destination. | |
getFileName ($value=null, $path=true) | |
Get the final filename. | |
getFileInfo ($value=null) | |
Get internal file informations. | |
setMultiFile ($count) | |
Set a multifile element. | |
getMultiFile () | |
Returns the multifile element number. | |
getMaxFileSize () | |
Sets the maximum file size of the form. | |
setMaxFileSize ($size) | |
Sets the maximum file size of the form. | |
setValueDisabled ($flag) | |
Set if the file will be uploaded when getting the value This defaults to false which will force receive() when calling getValues() | |
isValueDisabled () | |
Returns if the file will be uploaded when calling getValues() | |
getValue () | |
Processes the file, returns null or the filename only For the complete path, use getFileName. | |
setValue ($value) | |
Disallow setting the value. | |
setTranslator ($translator=null) | |
Set translator object for localization. | |
getTranslator () | |
Retrieve localization translator object. | |
setDisableTranslator ($flag) | |
Indicate whether or not translation should be disabled. | |
translatorIsDisabled () | |
Is translation disabled? | |
isReceived () | |
Was the file received? | |
isUploaded () | |
Was the file uploaded? | |
isFiltered () | |
Has the file been filtered? | |
getHash ($hash= 'crc32') | |
Returns the hash for this file element. | |
getFileSize () | |
Returns the filesize for this file element. | |
getMimeType () | |
Returns the mimetype for this file element. | |
render (Zend_View_Interface $view=null) | |
Render form element Checks for decorator interface to prevent errors. | |
Public Attributes | |
const | TRANSFER_ADAPTER = 'TRANSFER_ADAPTER' |
Plugin loader type. | |
$helper = 'formFile' | |
Protected Member Functions | |
_getErrorMessages () | |
Retrieve error messages and perform translation and value substitution. | |
Protected Attributes | |
$_adapter | |
$_validated = false | |
$_valueDisabled = false | |
$_counter = 1 | |
Static Protected Attributes | |
static | $_maxFileSize = -1 |
Additional Inherited Members | |
![]() | |
static | resolveElementId (Zend_Form_Decorator_Interface $decorator) |
Used to resolve and return an element ID. | |
|
protected |
Retrieve error messages and perform translation and value substitution.
addFilter | ( | $filter, | |
$options = null |
|||
) |
Add Filter; proxy to adapter.
string | array | $filter | Type of filter to add |
string | array | $options | Options to set for the filter |
addFilters | ( | array | $filters | ) |
Add Multiple filters at once; proxy to adapter.
array | $filters |
addPrefixPath | ( | $prefix, | |
$path, | |||
$type = null |
|||
) |
Add prefix path for plugin loader.
string | $prefix | |
string | $path | |
string | $type |
addValidator | ( | $validator, | |
$breakChainOnFailure = false , |
|||
$options = array() |
|||
) |
Add Validator; proxy to adapter.
string | Zend_Validate_Interface | $validator | |
bool | $breakChainOnFailure | |
mixed | $options |
addValidators | ( | array | $validators | ) |
Add multiple validators at once; proxy to adapter.
array | $validators |
clearFilters | ( | ) |
Remove all filters; proxy to adapter.
clearValidators | ( | ) |
Remove all validators; proxy to adapter.
getDestination | ( | ) |
Get the upload destination.
getErrors | ( | ) |
Retrieve error codes; proxy to transfer adapter.
getFileInfo | ( | $value = null | ) |
Get internal file informations.
string | $value | (Optional) Element or file to return |
getFileName | ( | $value = null , |
|
$path = true |
|||
) |
Get the final filename.
string | $value | (Optional) Element or file to return |
boolean | $path | (Optional) Return also the path, defaults to true |
getFileSize | ( | ) |
Returns the filesize for this file element.
getFilter | ( | $name | ) |
Retrieve individual filter; proxy to adapter.
string | $name |
getFilters | ( | ) |
Returns all set filters; proxy to adapter.
getHash | ( | $hash = 'crc32' | ) |
Returns the hash for this file element.
string | $hash | (Optional) Hash algorithm to use |
getMaxFileSize | ( | ) |
Sets the maximum file size of the form.
getMessages | ( | ) |
Retrieve error messages; proxy to transfer adapter.
Implements Zend_Validate_Interface.
getMimeType | ( | ) |
Returns the mimetype for this file element.
getMultiFile | ( | ) |
Returns the multifile element number.
getPluginLoader | ( | $type | ) |
getTransferAdapter | ( | ) |
Get transfer adapter.
Lazy loads HTTP transfer adapter when no adapter registered.
getTranslator | ( | ) |
Retrieve localization translator object.
getValidator | ( | $name | ) |
Retrieve validator by name; proxy to adapter.
string | $name |
getValidators | ( | ) |
Retrieve all validators; proxy to adapter.
getValue | ( | ) |
Processes the file, returns null or the filename only For the complete path, use getFileName.
hasErrors | ( | ) |
Are there errors registered?
isFiltered | ( | ) |
Has the file been filtered?
isReceived | ( | ) |
Was the file received?
isUploaded | ( | ) |
Was the file uploaded?
isValid | ( | $value, | |
$context = null |
|||
) |
Validate upload.
string | $value | File, can be optional, give null to validate all files |
mixed | $context |
isValueDisabled | ( | ) |
Returns if the file will be uploaded when calling getValues()
loadDefaultDecorators | ( | ) |
Load default decorators.
receive | ( | ) |
Receive the uploaded file.
removeFilter | ( | $name | ) |
removeValidator | ( | $name | ) |
render | ( | Zend_View_Interface | $view = null | ) |
Render form element Checks for decorator interface to prevent errors.
Zend_View_Interface | $view |
Zend_Form_Element_Exception |
setDestination | ( | $path | ) |
setDisableTranslator | ( | $flag | ) |
Indicate whether or not translation should be disabled.
bool | $flag |
setFilters | ( | array | $filters | ) |
Sets a filter for the class, erasing all previous set; proxy to adapter.
array | $filters | Filters to set |
setMaxFileSize | ( | $size | ) |
Sets the maximum file size of the form.
integer | $size |
setMultiFile | ( | $count | ) |
Set a multifile element.
integer | $count | Number of file elements |
setPluginLoader | ( | Zend_Loader_PluginLoader_Interface | $loader, |
$type | |||
) |
Set plugin loader.
Zend_Loader_PluginLoader_Interface | $loader | |
string | $type |
setTransferAdapter | ( | $adapter | ) |
Set transfer adapter.
string | Zend_File_Transfer_Adapter_Abstract | $adapter |
Zend_Form_Element_Exception |
setTranslator | ( | $translator = null | ) |
Set translator object for localization.
Zend_Translate | null | $translator |
setValidators | ( | array | $validators | ) |
Add multiple validators at once, overwriting; proxy to adapter.
array | $validators |
setValue | ( | $value | ) |
setValueDisabled | ( | $flag | ) |
Set if the file will be uploaded when getting the value This defaults to false which will force receive() when calling getValues()
boolean | $flag | Sets if the file is handled as the elements value |
translatorIsDisabled | ( | ) |
Is translation disabled?
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
$helper = 'formFile' |
const TRANSFER_ADAPTER = 'TRANSFER_ADAPTER' |
Plugin loader type.