Sanitize

Sanitizes arbitrary objects and arrays, and provides an object interface for accessing the sanitized objects and arrays.
Usage
<?php
use Sanitize\Sanitize;
$sanitized = Sanitize::clean($_POST);
$sanitized->foo;
Installation
Install via Composer, by first adding the following in your composer.json file:
{
"require": {
"adamnbowen/sanitize": "0.2.*"
}
}
Then run php composer.phar install in your terminal to download and install Sanitize. Make sure to require the vendor/autoload.php generated by Composer, and you should be good to go.
Coding Standards
Use the following coding standards in order:
TODO
- Test injection of objects into Sanitize
- Test __PHP_Incomplete_Class fix
Changelog
- Sanitize::Clean() is now Sanitize::clean()
- Filtered has been renamed to Proxy()
- Proxy is now iterable, so you can foreach over sanitized objects/arrays
- !empty() is no longer called on values—Sanitized objects will retain values of
false, 0, etc.