Class Zend_Form_Element_File

Description

Zend_Form_Element

  • version: $Id: File.php 22372 2010-06-04 20:17:58Z thomas $
  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Form/Element/File.php (line 34)

Zend_Form_Element
   |
   --Zend_Form_Element_Xhtml
      |
      --Zend_Form_Element_File
Class Constant Summary
 TRANSFER_ADAPTER = 'TRANSFER_ADAPTER'
Variable Summary
Method Summary
 Zend_Form_Element_File addFilter (string|array $filter, [string|array $options = null])
 Zend_Form_Element_File addPrefixPath (string $prefix, string $path, [string $type = null])
 Zend_Form_Element_File addValidator (string|Zend_Validate_Interface $validator, [bool $breakChainOnFailure = false], [mixed $options = array()])
 string getDestination ()
 array getErrors ()
 array getFileInfo ([string $value = null])
 string getFileName ([string $value = null], [boolean $path = true])
 string|array getFileSize ()
 Zend_Filter_Interface|null getFilter (string $name)
 array getFilters ()
 string|array getHash ([string $hash = 'crc32'])
 integer getMaxFileSize ()
 array getMessages ()
 string|array getMimeType ()
 integer getMultiFile ()
 Zend_Validate_Interface|null getValidator (string $name)
 array getValidators ()
 null|string getValue ()
 bool hasErrors ()
 bool isFiltered ()
 bool isReceived ()
 bool isUploaded ()
 bool isValid (string $value, [mixed $context = null])
 boolean isValueDisabled ()
 boolean receive ()
 string render ([ $view = null])
 Zend_Form_Element_File setFilters ( $filters, string|array $filter)
 integer setMaxFileSize (integer $size)
 Zend_Form_Element_File setPluginLoader ( $loader, string $type)
 Zend_Form_Element_File setTranslator ([Zend_Translate|null $translator = null])
Variables
static integer $_maxFileSize = -1 (line 69)
  • var: Maximum file size for MAX_FILE_SIZE attribut of form
  • access: protected
string $helper = 'formFile' (line 44)
  • var: Default view helper
  • access: public

Redefinition of:
Zend_Form_Element::$helper
Default view helper to use
  • access: protected
integer $_counter = 1 (line 64)
  • var: Internal multifile counter
  • access: protected
boolean $_validated = false (line 54)
  • var: Already validated ?
  • access: protected
boolean $_valueDisabled = false (line 59)
  • var: Disable value to be equal to file content
  • access: protected

Inherited Variables

Inherited from Zend_Form_Element

Zend_Form_Element::$_allowEmpty
Zend_Form_Element::$_autoInsertNotEmptyValidator
Zend_Form_Element::$_belongsTo
Zend_Form_Element::$_decorators
Zend_Form_Element::$_description
Zend_Form_Element::$_disableLoadDefaultDecorators
Zend_Form_Element::$_errorMessages
Zend_Form_Element::$_errorMessageSeparator
Zend_Form_Element::$_errors
Zend_Form_Element::$_filters
Zend_Form_Element::$_ignore
Zend_Form_Element::$_isArray
Zend_Form_Element::$_isError
Zend_Form_Element::$_isErrorForced
Zend_Form_Element::$_isPartialRendering
Zend_Form_Element::$_label
Zend_Form_Element::$_loaders
Zend_Form_Element::$_messages
Zend_Form_Element::$_name
Zend_Form_Element::$_order
Zend_Form_Element::$_required
Zend_Form_Element::$_translator
Zend_Form_Element::$_translatorDisabled
Zend_Form_Element::$_type
Zend_Form_Element::$_validatorRules
Zend_Form_Element::$_validators
Zend_Form_Element::$_value
Zend_Form_Element::$_view
Methods
addFilter (line 318)

Add Filter; proxy to adapter

  • access: public
Zend_Form_Element_File addFilter (string|array $filter, [string|array $options = null])
  • string|array $filter: Type of filter to add
  • string|array $options: Options to set for the filter

Redefinition of:
Zend_Form_Element::addFilter()
Add a filter to the element
addFilters (line 332)

Add Multiple filters at once; proxy to adapter

  • access: public
Zend_Form_Element_File addFilters ( $filters)
  • array $filters

Redefinition of:
Zend_Form_Element::addFilters()
Add filters to element
addPrefixPath (line 145)

Add prefix path for plugin loader

  • access: public
Zend_Form_Element_File addPrefixPath (string $prefix, string $path, [string $type = null])
  • string $prefix
  • string $path
  • string $type

Redefinition of:
Zend_Form_Element::addPrefixPath()
Add prefix path for plugin loader
addValidator (line 215)

Add Validator; proxy to adapter

  • access: public
Zend_Form_Element_File addValidator (string|Zend_Validate_Interface $validator, [bool $breakChainOnFailure = false], [mixed $options = array()])

Redefinition of:
Zend_Form_Element::addValidator()
Add validator to validation chain
addValidators (line 230)

Add multiple validators at once; proxy to adapter

  • access: public
Zend_Form_Element_File addValidators ( $validators)
  • array $validators

Redefinition of:
Zend_Form_Element::addValidators()
Add multiple validators
clearFilters (line 401)

Remove all filters; proxy to adapter

  • access: public
Zend_Form_Element_File clearFilters ()

Redefinition of:
Zend_Form_Element::clearFilters()
Clear all filters
clearValidators (line 302)

Remove all validators; proxy to adapter

  • access: public
Zend_Form_Element_File clearValidators ()

Redefinition of:
Zend_Form_Element::clearValidators()
Clear all validators
getDestination (line 514)

Get the upload destination

  • access: public
string getDestination ()
getErrors (line 472)

Retrieve error codes; proxy to transfer adapter

  • access: public
array getErrors ()

Redefinition of:
Zend_Form_Element::getErrors()
Retrieve validator chain errors
getFileInfo (line 541)

Get internal file informations

  • access: public
array getFileInfo ([string $value = null])
  • string $value: (Optional) Element or file to return
getFileName (line 526)

Get the final filename

  • access: public
string getFileName ([string $value = null], [boolean $path = true])
  • string $value: (Optional) Element or file to return
  • boolean $path: (Optional) Return also the path, defaults to true
getFileSize (line 835)

Returns the filesize for this file element

  • return: Filesize
  • access: public
string|array getFileSize ()
getFilter (line 360)

Retrieve individual filter; proxy to adapter

  • access: public
Zend_Filter_Interface|null getFilter (string $name)
  • string $name

Redefinition of:
Zend_Form_Element::getFilter()
Retrieve a single filter by name
getFilters (line 371)

Returns all set filters; proxy to adapter

  • return: List of set filters
  • access: public
array getFilters ()

Redefinition of:
Zend_Form_Element::getFilters()
Get all filters
getHash (line 824)

Returns the hash for this file element

  • return: Hashstring
  • access: public
string|array getHash ([string $hash = 'crc32'])
  • string $hash: (Optional) Hash algorithm to use
getMaxFileSize (line 584)

Sets the maximum file size of the form

  • access: public
integer getMaxFileSize ()
getMessages (line 492)

Retrieve error messages; proxy to transfer adapter

  • access: public
array getMessages ()

Redefinition of:
Zend_Form_Element::getMessages()
Retrieve error messages
getMimeType (line 846)

Returns the mimetype for this file element

  • return: Mimetype
  • access: public
string|array getMimeType ()
getMultiFile (line 574)

Returns the multifile element number

  • access: public
integer getMultiFile ()
getPluginLoader (line 118)

Get Plugin Loader

  • access: public
Zend_Loader_PluginLoader_Interface getPluginLoader (string $type)
  • string $type

Redefinition of:
Zend_Form_Element::getPluginLoader()
Retrieve plugin loader for validator or filter chain
getTransferAdapter (line 199)

Get transfer adapter

Lazy loads HTTP transfer adapter when no adapter registered.

  • access: public
Zend_File_Transfer_Adapter_Abstract getTransferAdapter ()
getTranslator (line 744)

Retrieve localization translator object

  • access: public
Zend_Translate_Adapter|null getTranslator ()

Redefinition of:
Zend_Form_Element::getTranslator()
Retrieve localization translator object
getValidator (line 260)

Retrieve validator by name; proxy to adapter

  • access: public
Zend_Validate_Interface|null getValidator (string $name)
  • string $name

Redefinition of:
Zend_Form_Element::getValidator()
Retrieve a single validator by name
getValidators (line 271)

Retrieve all validators; proxy to adapter

  • access: public
array getValidators ()

Redefinition of:
Zend_Form_Element::getValidators()
Retrieve all validators
getValue (line 691)

Processes the file, returns null or the filename only For the complete path, use getFileName

  • access: public
null|string getValue ()

Redefinition of:
Zend_Form_Element::getValue()
Retrieve filtered element value
hasErrors (line 482)

Are there errors registered?

  • access: public
bool hasErrors ()

Redefinition of:
Zend_Form_Element::hasErrors()
Are there errors registered?
isFiltered (line 812)

Has the file been filtered?

  • access: public
bool isFiltered ()
isReceived (line 790)

Was the file received?

  • access: public
bool isReceived ()
isUploaded (line 801)

Was the file uploaded?

  • access: public
bool isUploaded ()
isValid (line 416)

Validate upload

  • access: public
bool isValid (string $value, [mixed $context = null])
  • string $value: File, can be optional, give null to validate all files
  • mixed $context

Redefinition of:
Zend_Form_Element::isValid()
Validate element value
isValueDisabled (line 680)

Returns if the file will be uploaded when calling getValues()

  • return: Receive the file on calling getValues()?
  • access: public
boolean isValueDisabled ()
loadDefaultDecorators (line 76)

Load default decorators

  • access: public
void loadDefaultDecorators ()

Redefinition of:
Zend_Form_Element::loadDefaultDecorators()
Load default decorators
receive (line 451)

Receive the uploaded file

  • access: public
boolean receive ()
removeFilter (line 388)

Remove an individual filter; proxy to adapter

  • access: public
Zend_Form_Element_File removeFilter (string $name)
  • string $name

Redefinition of:
Zend_Form_Element::removeFilter()
Remove a filter by name
removeValidator (line 288)

Remove validator by name; proxy to adapter

  • access: public
Zend_Form_Element_File removeValidator (string $name)
  • string $name

Redefinition of:
Zend_Form_Element::removeValidator()
Remove a single validator by name
render (line 859)

Render form element Checks for decorator interface to prevent errors

  • access: public
string render ([ $view = null])

Redefinition of:
Zend_Form_Element::render()
Render form element
setDestination (line 503)

Set the upload destination

  • access: public
Zend_Form_Element_File setDestination (string $path)
  • string $path
setDisableTranslator (line 765)

Indicate whether or not translation should be disabled

  • access: public
Zend_Form_Element_File setDisableTranslator (bool $flag)
  • bool $flag

Redefinition of:
Zend_Form_Element::setDisableTranslator()
Indicate whether or not translation should be disabled
setFilters (line 346)

Sets a filter for the class, erasing all previous set; proxy to adapter

  • access: public
Zend_Form_Element_File setFilters ( $filters, string|array $filter)
  • string|array $filter: Filter to set
  • array $filters

Redefinition of:
Zend_Form_Element::setFilters()
Add filters to element, overwriting any already existing
setMaxFileSize (line 610)

Sets the maximum file size of the form

  • access: public
integer setMaxFileSize (integer $size)
  • integer $size
setMultiFile (line 556)

Set a multifile element

  • return: Provides fluent interface
  • access: public
Zend_Form_Element_File setMultiFile (integer $count)
  • integer $count: Number of file elements
setPluginLoader (line 100)

Set plugin loader

  • access: public
Zend_Form_Element_File setPluginLoader ( $loader, string $type)

Redefinition of:
Zend_Form_Element::setPluginLoader()
Set plugin loader to use for validator or filter chain
setTransferAdapter (line 171)

Set transfer adapter

  • access: public
Zend_Form_Element_File setTransferAdapter (string|Zend_File_Transfer_Adapter_Abstract $adapter)
setTranslator (line 730)

Set translator object for localization

  • access: public
Zend_Form_Element_File setTranslator ([Zend_Translate|null $translator = null])

Redefinition of:
Zend_Form_Element::setTranslator()
Set translator object for localization
setValidators (line 245)

Add multiple validators at once, overwriting; proxy to adapter

  • access: public
Zend_Form_Element_File setValidators ( $validators)
  • array $validators

Redefinition of:
Zend_Form_Element::setValidators()
Set multiple validators, overwriting previous validators
setValue (line 719)

Disallow setting the value

  • access: public
Zend_Form_Element_File setValue (mixed $value)
  • mixed $value

Redefinition of:
Zend_Form_Element::setValue()
Set element value
setValueDisabled (line 669)

Set if the file will be uploaded when getting the value This defaults to false which will force receive() when calling getValues()

  • access: public
Zend_Form_Element_File setValueDisabled (boolean $flag)
  • boolean $flag: Sets if the file is handled as the elements value
translatorIsDisabled (line 779)

Is translation disabled?

  • access: public
bool translatorIsDisabled ()

Redefinition of:
Zend_Form_Element::translatorIsDisabled()
Is translation disabled?
_getErrorMessages (line 881)

Retrieve error messages and perform translation and value substitution

  • access: protected
array _getErrorMessages ()

Redefinition of:
Zend_Form_Element::_getErrorMessages()
Retrieve error messages and perform translation and value substitution

Inherited Methods

Inherited From Zend_Form_Element

 Zend_Form_Element::__construct()
 Zend_Form_Element::addDecorator()
 Zend_Form_Element::addDecorators()
 Zend_Form_Element::addError()
 Zend_Form_Element::addErrorMessage()
 Zend_Form_Element::addErrorMessages()
 Zend_Form_Element::addErrors()
 Zend_Form_Element::addFilter()
 Zend_Form_Element::addFilters()
 Zend_Form_Element::addPrefixPath()
 Zend_Form_Element::addPrefixPaths()
 Zend_Form_Element::addValidator()
 Zend_Form_Element::addValidators()
 Zend_Form_Element::autoInsertNotEmptyValidator()
 Zend_Form_Element::clearDecorators()
 Zend_Form_Element::clearErrorMessages()
 Zend_Form_Element::clearFilters()
 Zend_Form_Element::clearValidators()
 Zend_Form_Element::filterName()
 Zend_Form_Element::getAllowEmpty()
 Zend_Form_Element::getAttrib()
 Zend_Form_Element::getAttribs()
 Zend_Form_Element::getBelongsTo()
 Zend_Form_Element::getDecorator()
 Zend_Form_Element::getDecorators()
 Zend_Form_Element::getDescription()
 Zend_Form_Element::getErrorMessages()
 Zend_Form_Element::getErrorMessageSeparator()
 Zend_Form_Element::getErrors()
 Zend_Form_Element::getFilter()
 Zend_Form_Element::getFilters()
 Zend_Form_Element::getFullyQualifiedName()
 Zend_Form_Element::getId()
 Zend_Form_Element::getIgnore()
 Zend_Form_Element::getLabel()
 Zend_Form_Element::getMessages()
 Zend_Form_Element::getName()
 Zend_Form_Element::getOrder()
 Zend_Form_Element::getPluginLoader()
 Zend_Form_Element::getTranslator()
 Zend_Form_Element::getType()
 Zend_Form_Element::getUnfilteredValue()
 Zend_Form_Element::getValidator()
 Zend_Form_Element::getValidators()
 Zend_Form_Element::getValue()
 Zend_Form_Element::getView()
 Zend_Form_Element::hasErrors()
 Zend_Form_Element::hasTranslator()
 Zend_Form_Element::init()
 Zend_Form_Element::isArray()
 Zend_Form_Element::isRequired()
 Zend_Form_Element::isValid()
 Zend_Form_Element::loadDefaultDecorators()
 Zend_Form_Element::loadDefaultDecoratorsIsDisabled()
 Zend_Form_Element::markAsError()
 Zend_Form_Element::removeDecorator()
 Zend_Form_Element::removeFilter()
 Zend_Form_Element::removeValidator()
 Zend_Form_Element::render()
 Zend_Form_Element::setAllowEmpty()
 Zend_Form_Element::setAttrib()
 Zend_Form_Element::setAttribs()
 Zend_Form_Element::setAutoInsertNotEmptyValidator()
 Zend_Form_Element::setBelongsTo()
 Zend_Form_Element::setConfig()
 Zend_Form_Element::setDecorators()
 Zend_Form_Element::setDescription()
 Zend_Form_Element::setDisableLoadDefaultDecorators()
 Zend_Form_Element::setDisableTranslator()
 Zend_Form_Element::setErrorMessages()
 Zend_Form_Element::setErrorMessageSeparator()
 Zend_Form_Element::setErrors()
 Zend_Form_Element::setFilters()
 Zend_Form_Element::setIgnore()
 Zend_Form_Element::setIsArray()
 Zend_Form_Element::setLabel()
 Zend_Form_Element::setName()
 Zend_Form_Element::setOptions()
 Zend_Form_Element::setOrder()
 Zend_Form_Element::setPluginLoader()
 Zend_Form_Element::setRequired()
 Zend_Form_Element::setTranslator()
 Zend_Form_Element::setValidators()
 Zend_Form_Element::setValue()
 Zend_Form_Element::setView()
 Zend_Form_Element::translatorIsDisabled()
 Zend_Form_Element::_filterValue()
 Zend_Form_Element::_getDecorator()
 Zend_Form_Element::_getErrorMessages()
 Zend_Form_Element::_hasErrorMessages()
 Zend_Form_Element::_loadDecorator()
 Zend_Form_Element::_loadFilter()
 Zend_Form_Element::_loadValidator()
 Zend_Form_Element::__call()
 Zend_Form_Element::__get()
 Zend_Form_Element::__set()
 Zend_Form_Element::__toString()
Class Constants
TRANSFER_ADAPTER = 'TRANSFER_ADAPTER' (line 39)

Plugin loader type

Inherited Constants

Inherited from Zend_Form_Element

Zend_Form_Element::DECORATOR
Zend_Form_Element::FILTER
Zend_Form_Element::VALIDATE

Documentation generated on Mon, 21 Jun 2010 15:23:10 -0400 by phpDocumentor 1.4.3