Fully Qualified Name: | Zend\InputFilter\FileInput\PsrFileInputDecorator |
Extends: | FileInput |
Implements: | FileInputDecoratorInterface |
PsrFileInput is a special Input type for handling uploaded files through PSR-7 middlware.
It differs from Input in a few ways:
It expects the raw value to be an instance of UploadedFileInterface.
The validators are run before the filters (the opposite behavior of Input). This is so validation can be run prior to any filters that may rename/move/modify the file.
Instead of adding a NotEmpty validator, it will (by default) automatically add a Zend\Validator\File\Upload validator.
Parameter Name | Type | Description |
---|---|---|
$subject |
Returns: void
Returns: bool
Returns: bool
Returns: void
Returns: bool
Returns: bool
Returns: string|null
Returns: mixed
Returns: \FilterChain
Returns: string[]
Returns: string
Returns: mixed
Returns: \ValidatorChain
Returns: \UploadedFileInterface|\UploadedFileInterface[]
Returns: bool
Flag for inform if input value was set.
This flag used for distinguish when {@link Input::getValue()} will return the value previously set or the default.
Returns: bool
Checks if the raw input value is an empty file input eg: no file was uploaded
Parameter Name | Type | Description |
---|---|---|
$rawValue | ||
$rawValue |
Returns: bool
Checks if the raw input value is an empty file input eg: no file was uploaded
Parameter Name | Type | Description |
---|---|---|
$rawValue | \UploadedFileInterface|array |
Returns: bool
Returns: bool
Parameter Name | Type | Description |
---|---|---|
$context | mixed | Extra |
Returns: bool
Parameter Name | Type | Description |
---|---|---|
$input | \InputInterface |
Returns: \FileInput
Returns: void
Parameter Name | Type | Description |
---|---|---|
$allowEmpty | bool |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$value | bool | Enable/Disable |
Returns: \FileInput
Parameter Name | Type | Description |
---|---|---|
$breakOnFailure | bool |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$continueIfEmpty | bool |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$errorMessage | string|null |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$filterChain | \FilterChain |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$required | bool |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$validatorChain | \ValidatorChain |
Returns: \Input
Parameter Name | Type | Description |
---|---|---|
$value | array|\UploadedFile |
Returns: \Input