Zend Framework
3.0
|
FileInput is a special Input type for handling uploaded files. More...
Public Member Functions | |
setAutoPrependUploadValidator ($value) | |
getAutoPrependUploadValidator () | |
getValue () | |
isEmptyFile ($rawValue) | |
Checks if the raw input value is an empty file input eg: no file was uploaded. | |
isValid ($context=null) | |
merge (InputInterface $input) | |
Public Member Functions inherited from Input | |
__construct ($name=null) | |
setAllowEmpty ($allowEmpty) | |
setBreakOnFailure ($breakOnFailure) | |
setContinueIfEmpty ($continueIfEmpty) | |
setErrorMessage ($errorMessage) | |
setFilterChain (FilterChain $filterChain) | |
setName ($name) | |
setRequired ($required) | |
setValidatorChain (ValidatorChain $validatorChain) | |
setValue ($value) | |
Set the input value. | |
resetValue () | |
Reset input value to the default state. | |
setFallbackValue ($value) | |
allowEmpty () | |
breakOnFailure () | |
continueIfEmpty () | |
getErrorMessage () | |
getFilterChain () | |
getName () | |
getRawValue () | |
isRequired () | |
getValidatorChain () | |
getValue () | |
hasValue () | |
Flag for inform if input value was set. | |
getFallbackValue () | |
hasFallback () | |
clearFallbackValue () | |
merge (InputInterface $input) | |
isValid ($context=null) | |
getMessages () | |
Public Member Functions inherited from InputInterface | |
isValid () | |
Protected Member Functions | |
injectUploadValidator () | |
injectNotEmptyValidator () | |
Protected Member Functions inherited from Input | |
injectNotEmptyValidator () | |
prepareRequiredValidationFailureMessage () | |
Create and return the validation failure message for required input. | |
Protected Attributes | |
$isValid = false | |
$autoPrependUploadValidator = true | |
Protected Attributes inherited from Input | |
$allowEmpty = false | |
$continueIfEmpty = false | |
$breakOnFailure = false | |
$errorMessage | |
$filterChain | |
$name | |
$notEmptyValidator = false | |
$required = true | |
$validatorChain | |
$value | |
$hasValue = false | |
$fallbackValue | |
$hasFallback = false | |
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 Zend validator.
getAutoPrependUploadValidator | ( | ) |
getValue | ( | ) |
Implements InputInterface.
|
protected |
No-op, NotEmpty validator does not apply for FileInputs. See also: BaseInputFilter::isValid()
|
protected |
isEmptyFile | ( | $rawValue | ) |
Checks if the raw input value is an empty file input eg: no file was uploaded.
$rawValue |
isValid | ( | $context = null | ) |
mixed | $context | Extra "context" to provide the validator |
merge | ( | InputInterface | $input | ) |
setAutoPrependUploadValidator | ( | $value | ) |
bool | $value | Enable/Disable automatically prepending an Upload validator |
|
protected |
|
protected |