Download the PHP package azjezz/input-hydrator without Composer
On this page you can find all versions of the php package azjezz/input-hydrator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azjezz/input-hydrator
More information about azjezz/input-hydrator
Files in azjezz/input-hydrator
Package input-hydrator
Short Description Hydrates input DTOs from request input.
License MIT
Informations about the package input-hydrator
Input Hydrator
Input hydrator is a simple hydrator made for the sole purpose of hydrating data-transfer input objects.
Installation
Example:
While hydrating objects, some exceptions might be thrown:
-
AzJezz\Input\Exception\TypeException
: this exception should result in 500 HTTP status code, as it represents an issue within the input class itself. such as the usage of a non-supported type, or missing type for a specific property. AzJezz\Input\Exception\BadInputException
: this exception should result in a 400 HTTP status code, as it means that the supplied request data doesn't match the input DTO structure.
Currently, Input-Hydrator is limited to a small set of types:
scalar
(string
,int
,float
, andbool
)null
- any object that implements
AzJezz\Input\InputInterface
Union types are supported for PHP >= 8.0, for example:
License
The MIT License (MIT). Please see LICENSE
for more information.