daft-framework/daft-psr-router
Composer 安装命令:
composer require daft-framework/daft-psr-router
包简介
PSR-based variant of signpostmarv/daft-router
README 文档
README
Copyright 2020 SignpostMarv
daft-psr-router
Finally got around to creating a psr-based router. Because reasons.
Adapts signpostmarv/daft-router patterns to work with PSR-7, PSR-15, etc.
differences between daft-router & daft-psr-router
nikic/fast-route
- the custom RouteCollector (which served only to provide type hinting) was dropped.
- the route compiler was simplified, with the instantiation + manipulation methods being dropped.
- the requirement for using
FastRoute\cachedDispatcherwas dropped, although it's use is still recommended - the custom dispatcher was dropped in favour of a final static method that accepts any
FastRoute\Dispatcherinstance, strictly checks the result ofFastRoute\Dispatcher::dispatch(), and returns an object representing the return value.
psr-15
- daft-router's request interceptors were retained by adding a specific
Psr\Http\Message\ResponseInterfaceinstance.
统计信息
- 总下载量: 250
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2020-02-27