Class FilePostRedirectGet

Summary

Fully Qualified Name: Zend\Mvc\Plugin\FilePrg\FilePostRedirectGet
Extends: AbstractPlugin

Description

Plugin to help facilitate Post/Redirect/Get for file upload forms (http://en.wikipedia.org/wiki/Post/Redirect/Get)

Requires that the Form's File inputs contain a 'fileRenameUpload' filter with the target option set: 'target' => /valid/target/path'. This is so the files are moved to a new location between requests. If this filter is not added, the temporary upload files will disappear between requests.

Methods

Name Description Defined By
__invoke() FilePostRedirectGet
getController() Get the current controller instance AbstractPlugin
getSessionContainer() FilePostRedirectGet
setController() Set the current controller instance AbstractPlugin
setSessionContainer() FilePostRedirectGet

Method Details

__invoke()

Parameter Name Type Description
$form \FormInterface
$redirect string Route
$redirectToUrl bool Use

Returns: bool|array|\Response

getController()

Get the current controller instance

Returns: null|\Dispatchable

getSessionContainer()

Returns: \Container

setController()

Set the current controller instance

Parameter Name Type Description
$controller \Dispatchable

Returns: void

setSessionContainer()

Parameter Name Type Description
$container \Container

Returns: \FilePostRedirectGet

Top