daylerees/sanitizer — pull request #6 by jotafurtado (2014-07-11 06:04:22+00:00)
Title: Added ability to pass parameters to rules

Hi @daylerees, I'm sending this PR to add a new functionality to this amazing package. Hope you appreciate. This PR adds ability to pass parameters to sanitizers rules and also fix temporarily issue #3.

### Example of usage
Creating a rule class
```php
'trim',
'name' => 'prefix:Mr.|suffix:Senior',
'email' => 'strtolower',
'code' => 'str_pad:10,0,0'
];

// Data array to be sanitized.
$data = [
'name' => 'Dayle ',
'email' => ' me@DAYLEREES.com',
'code' => ' 2435 '
];

$sanitizedData = Sanitizer::sanitize($rules, $data);

dd($sanitizedData);

});
```

Output
```php
array (size=3)
'name' => string 'Mr. Dayle Senior' (length=16)
'email' => string 'me@daylerees.com' (length=16)
'code' => string '0000002435' (length=10)
```