PHP code example of helbing / input_handle

1. Go to this page and download the library: Download helbing/input_handle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

helbing / input_handle example snippets


$handle = new inputHandle();

$data = $handle->inputHandle($data, InputHandle::TYPE_STRING, $defaultVal);

$handle = new inputHandle();

$data = $handle->inputHandle($data, InputHandle::TYPE_STRING, $defaultVal, 'trim,htmlspecialchars');


use Helbing\Handle\Factory;

class MyFilter implements Factory
{
    public function name()
    {
        return 'filter-name';
    }

    public function filter($input)
    {
        return doSomething($input);
    }
}

$handle = new inputHandle();

$handle->push(new MyFilter());

$data = $handle->inputHandle($data, InputHandle::TYPE_STRING);