1036. Class

1036.1. Zend\InputFilter\FileInput

FileInput is a special Input type for handling uploaded files.

It differs from Input in a few ways:

  1. It expects the raw value to be in the $_FILES array format.
  2. The validators are run before the filters (the opposite behavior of Input). This is so is_uploaded_file() validation can be run prior to any filters that may rename/move/modify the file.
  3. Instead of adding a NotEmpty validator, it will (by default) automatically add a ZendValidatorFileUpload validator.

1036.1.1. Methods

1036.1.1.1. setAutoPrependUploadValidator

setAutoPrependUploadValidator()

@param boolean $value Enable/Disable automatically prepending an Upload validator

Return type:FileInput

1036.1.1.2. getAutoPrependUploadValidator

getAutoPrependUploadValidator()

@return boolean

1036.1.1.3. getValue

getValue()

@return mixed

1036.1.1.4. isValid

isValid()

@param mixed $context Extra “context” to provide the validator

Return type:boolean

1036.1.1.5. injectUploadValidator

injectUploadValidator()

@return void

1036.1.1.6. injectNotEmptyValidator

injectNotEmptyValidator()

No-op, NotEmpty validator does not apply for FileInputs. See also: BaseInputFilter::isValid()

Return type:void

1036.1.1.7. merge

merge()

@param InputInterface $input

Return type:FileInput