PHP code example of imj / yaf-request

1. Go to this page and download the library: Download imj/yaf-request 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/ */

    

imj / yaf-request example snippets


use Imj\Filter;
use Imj\YafRequest;

$request = new YafRequest();
$foo = $request->get('foo', Filter::STRING_TYPE);
$bar = $request->post('bar', Filter::INT_TYPE, ['min'=>1]);
$baz = $request->request('baz', Filter::STRING_TYPE);
$fbb = $request->cookie('fbb', Filter::STRING_TYPE);