PHPackages                             linio/input - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. linio/input

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

linio/input
===========

Abstracts HTTP request input handling, providing an easy interface for data hydration and validation

2.9.1(3y ago)3856.2k14[2 issues](https://github.com/LinioIT/input/issues)[1 PRs](https://github.com/LinioIT/input/pulls)BSD-3-ClausePHPPHP ^8.1

Since Mar 16Pushed 2y ago53 watchersCompare

[ Source](https://github.com/LinioIT/input)[ Packagist](https://packagist.org/packages/linio/input)[ RSS](/packages/linio-input/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (29)Used By (0)

Linio Input
===========

[](#linio-input)

[![Latest Stable Version](https://camo.githubusercontent.com/558521ad707e11744b8fb41505190d23bf9bd2f9a79f1a8d41409df2d92eea4a/68747470733a2f2f706f7365722e707567782e6f72672f6c696e696f2f696e7075742f762f737461626c652e737667)](https://packagist.org/packages/linio/input) [![License](https://camo.githubusercontent.com/4f536afd9c94fb9348472a4b72c81e87f7c6e32106a0c64df7448d5c4bc6a974/68747470733a2f2f706f7365722e707567782e6f72672f6c696e696f2f696e7075742f6c6963656e73652e737667)](https://packagist.org/packages/linio/input) [![Build Status](https://camo.githubusercontent.com/2228355db332c5a786d3b81cec58ad6c53d4367e7b4beaea635fb5719ecbeb2d/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f4c696e696f49542f696e7075742e706e67)](http://travis-ci.org/LinioIT/input) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/3ce406dd5dc4d73731a14c0dc62294da444c6d148c5d563426bbfc159ad599f2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4c696e696f49542f696e7075742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/LinioIT/input/?branch=master)

Linio Input is yet another component of the Linio Framework. It aims to abstract HTTP request input handling, allowing a seamless integration with your domain model. The component is responsible for:

- Parsing request body contents
- Validating input data
- Hydrating input data into objects

Install
-------

[](#install)

The recommended way to install Linio Input is [through composer](http://getcomposer.org).

```
{
    "require": {
        "linio/input": "dev-master"
    }
}
```

Tests
-----

[](#tests)

To run the test suite, you need install the dependencies via composer, then run PHPUnit.

```
$ composer install
$ phpunit

```

Usage
-----

[](#usage)

The library is very easy to use: first, you have to create your input handler class. The input handlers are responsible for specifying which data you're expecting to receive from requests. Let's create one:

```
