delboy1978uk/bone-http
最新稳定版本:v2.10.0
Composer 安装命令:
composer require delboy1978uk/bone-http
包简介
HTTP package for Bone Framework
README 文档
README
Http Middleware stack and HAL middleware for Bone Framework.
installation
This is a core package of Bone Framework. It is installed by default.
usage
middleware stack
To add application wide middleware that will run pre-routing, just add your middleware class into your
config/middleware.php file. For instance, to use the delboy1978uk/bone-firewall middleware:
<?php use Bone\Firewall\RouteFirewall; return [ 'stack' => [ RouteFirewall::class, ], ];
You can add middleware of course to the router's stack, either on a group of routes or an individual route.
bundled middleware
This package comes with two middleware classes for representing HAL links for an API.
For a single entity, you can use the Bone\Http\Middleware\HalEntity, and for an array you can use the
Bone\Http\Middleware\HalCollection.
adding your own middlware to a package
If your package class implements Bone\Http\MiddlewareRegistrationInterface you can return an array of middlewares
and it will be added by the Bone Application to the container
统计信息
- 总下载量: 4.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-01