fratily/router
Composer 安装命令:
composer require fratily/router
包简介
README 文档
README
Usage
use Fratily\Router\RouterBuilder; use Fratily\Router\Route; use Fratily\Router\RouteOption; $option = new RouteOption(); $routes = [ new Route('/', $option->strictCheckTrailing(false)), new Route('/foo/bar', $option->strictCheckTrailing(false)), new Route('/foo/:name'), $matchRoute = (new Route('/foo/:name/setting')), new Route('/foo/:name/profile'), new Route('/bar'), new Route('/baz'), ]; $router = (new RouterBuilder($routes))->build(); [ 'route' => $route, // $matchRoute 'params' => $params // ['name' => 'any'] ] = $router->match('/foo/any/setting');
统计信息
- 总下载量: 149
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-10