chriso/klein.php — pull request #85 by limenet (2013-03-27 20:50:50+00:00)
Title: validateUri()

I just struggled with the following problem: I need to check whether the requested site requires a user to be logged in or whether it's public. As the `validate()` in conjunction with `isRegex()` seemed really handy, I tried it but soon found out, `validate()` only supports `param()` but not `uri()`... So I decided to add the function `validateUri()`. I hope that's ok with you and doesn't contradict klein.php's philosophy!

FYI, that's how I use it:
```php
respond('*', function ($request, $response, $app) {
if($request->validateUri(false)->isRegex('/(home|about)/') === false){
global $signiu;
$signiu->requiredState(true);
}
});
```