Cliprz/MVC — pull request #20 by alaa13212 (2013-02-23 19:43:50+00:00)
Title: Add Filter library

Filter Request Inputs
=====================
This library filter `$_GET` and `$_POST` arrays.

===================================================================
Add filter folder to BASE_PATH/cliprz_system/libraries/
===================================================================

========================================================
Add in BASE_PATH/cliprz_application/config/libraries.php
========================================================
cliprz::library_use('filter', 'filter');

=============
How to use it
=============
/**
* functions get, post, filter.
*
* param 1. Field name (value in filter function)
* 2. filter type
*
* typs int, text, email, number, url
*/

$id = cliprz::library('filter')->get('user_id', 'int');

$name = cliprz::library('filter')->post('username', 'text');

$email = cliprz::library('filter')->post('email', 'email');

$price = cliprz::library('filter')->get('item_price', 'number');

$url = cliprz::library('filter')->filter('http://google.com', 'url');