超灵活的路径
减少重复代码(dry)
示例代码:
$app = new bullet\app();$app->path('foo', function($request) use($app) { return foo;});$app->path('bar', function($request) use($app) { $foo = $app->run('get', 'foo'); // $foo is now a `bullet\response` instance return $foo->content() . bar;});echo $app->run('get', 'bar'); // echos 'foobar' with a 200 ok status
项目主页:http://www.open-open.com/lib/view/home/1437227078006
