Download the PHP package lexal/http-stepped-form without Composer
On this page you can find all versions of the php package lexal/http-stepped-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lexal/http-stepped-form
More information about lexal/http-stepped-form
Files in lexal/http-stepped-form
Informations about the package http-stepped-form
HTTP based Stepped Form
The package is based on the Stepped Form package and works with HTTP response and request (transforms form exception into Response and renders or redirects depending on base form return value).
Table of Contents
- Requirements
- Installation
- Usage
- Exception Normalizers
- License
Requirements
PHP: >=8.1
Installation
Via Composer
Usage
- Create a base Stepped Form.
-
Declare your form settings.
-
Create a Redirector. The Redirector creates and returns Redirect Response.
-
Create a Renderer. The Renderer creates and returns Response by template definition.
-
Create an Exception Normalizer.
-
Create a Stepped Form.
- Use Stepped Form in your application.
Exception Normalizers
Exception Normalizers are used for normalizing Stepped Form exceptions into the Response instance. Create class
that implements ExceptionNormalizerInterface to have your own exception normalizer.
The package already contains normalizers for all available exceptions:
AlreadyStartedExceptionNormalizer- redirects to the current renderable step.EntityNotFoundExceptionNormalizer- redirects with errors to the previously renderable step or the URL before form start.FormNotStartedExceptionNormalizer- redirects with errors to the URL before form start.StepNotFoundExceptionNormalizer- returns 404 HTTP status code.StepNotRenderableExceptionNormalizer- returns 404 HTTP status code.SteppedFormErrorsExceptionNormalizer- redirects with errors to the previously renderable step or the URL before form start.StepNotSubmittedExceptionNormalizer- redirects with errors to the previously renderable step or the URL before form start.DefaultExceptionNormalizer- rethrows exception.
License
HTTP Stepped Form is licensed under the MIT License. See LICENSE for the full license text.
All versions of http-stepped-form with dependencies
lexal/stepped-form Version ^4.0
symfony/http-foundation Version ^5.4.50 || ^6.4.29 || ^7.3.7