mireiawen / input
Input parsers for $_POST, $_GET, $_SESSION and $_ENV
1.2.0
2022-06-16 21:13 UTC
Requires
- php: >=7.4.0
- ext-gettext: *
Requires (Dev)
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2025-03-17 03:38:01 UTC
README
Simple set of classes to allow reading of PHP input arrays $_GET
, $_POST
, $_ENV
and $_SESSION
The classes have methods to read the values as different types and either cast the value to type, or throw exception of class Type
if the value in the input array is not of correct type.
The methods will also throw MissingValue
-exception if the value does not exist and no default value is given.
Requirements
- Intl extension
- PHP 7.3
Installation
You can clone or download the code from the GitHub repository or you can use composer: composer require mireiawen/input