Skip to content

v1.3.0

Compare
Choose a tag to compare
@clue clue released this 11 Aug 09:27
· 16 commits to master since this release
  • Feature: Add support for custom filter callbacks
    (#25 by @clue)

    $tokenizer = new Tokenizer();
    $tokenizer->addFilter('ip', function ($value) {
        return filter_var($ip, FILTER_VALIDATE_IP);
    });
    $tokenizer->addFilter('lower', function (&$value) {
        $value = strtolower($value);
        return true;
    });
    
    $router = new Router($tokenizer);
    $router->add('add <name:lower>', function ($args) { });
    $router->add('--search=<address:ip>', function ($args) { });
  • Improve test suite by locking Travis distro so new future defaults will not break the build
    (#24 by @clue)