Download the PHP package azjezz/input-hydrator-bundle without Composer
On this page you can find all versions of the php package azjezz/input-hydrator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azjezz/input-hydrator-bundle
More information about azjezz/input-hydrator-bundle
Files in azjezz/input-hydrator-bundle
Package input-hydrator-bundle
Short Description Hydrates input DTOs from request input.
License MIT
Informations about the package input-hydrator-bundle
Input Hydrator Bundle
About
InputHydratorBundle provides a Symfony Bundle for azjezz/input-hydrator
package.
Installation
To install the bundle, run the command below and you will get the latest version:
Configuration
Configuring the input hydrator bundle is pretty straight forward,
all you need to do is add the bundle to your config/bundles.php
:
Note: this will be done for you automatically if you have
symfony/flex
installed.
That's it.
Usage
To use the input hydrator, you first need to create your input DTO class.
for example:
later you can request the DTO as a parameter in your controller:
Using Symfony's argument resolver, the bundle is able to hydrate the Search
DTO and pass it on to your controller.
In case the request doesn't specify the query
field, or query
contains another type ( e.g. array
),
the argument resolver will throw BadRequestHttpException
which will result in a 400 Bad Request
response.
License
The MIT License (MIT). Please see LICENSE
for more information.
All versions of input-hydrator-bundle with dependencies
azjezz/input-hydrator Version ^1.0
symfony/framework-bundle Version ^4.4 || ^5.0