1427. Class

1427.1. Zend\Mvc\Controller\Plugin\FilePostRedirectGet

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.

1427.1.1. Methods

1427.1.1.1. __invoke

__invoke()

@param FormInterface $form

Parameters:
  • string – Route or URL string (default: current route)
  • boolean – Use $redirect as a URL string (default: false)
Return type:

boolean|array|Response

1427.1.1.2. handlePostRequest

handlePostRequest()

@param FormInterface $form

Parameters:
  • string – Route or URL string (default: current route)
  • boolean – Use $redirect as a URL string (default: false)
Return type:

Response

1427.1.1.3. handleGetRequest

handleGetRequest()

@param FormInterface $form

Return type:boolean|array

1427.1.1.4. getSessionContainer

getSessionContainer()

@return Container

1427.1.1.5. setSessionContainer

setSessionContainer()

@param Container $container

Return type:FilePostRedirectGet

1427.1.1.6. setProtectedFormProperty

setProtectedFormProperty()

@param FormInterface $form

Parameters:
  • string
  • mixed
Return type:

FilePostRedirectGet

1427.1.1.7. traverseInputs

traverseInputs()

Traverse the InputFilter and run a callback against each Input and associated value

Parameters:
  • InputFilterInterface
  • array
  • callable
Return type:

array|null

1427.1.1.8. getNonEmptyUploadData

getNonEmptyUploadData()

Traverse the InputFilter and only return the data of FileInputs that have an upload

Parameters:
  • InputFilterInterface
  • array
Return type:

array

1427.1.1.9. getEmptyUploadData

getEmptyUploadData()

Traverse the InputFilter and only return the data of FileInputs that are empty

Parameters:
  • InputFilterInterface
  • array
Return type:

array

1427.1.1.10. redirect

redirect()

TODO: Good candidate for traits method in PHP 5.4 with PostRedirectGet plugin

Parameters:
  • string
  • boolean
Return type:

Response

Throws :

ZendMvcExceptionRuntimeException