legionth/http-middleware

v0.1.0 2016-12-05 12:54 UTC

This package is auto-updated.

Last update: 2024-09-16 19:21:05 UTC


README

基于当前状态(2016-12-05)的等价 fig-php 的 PSR 文档 的 HTTP 中间件接口

目录

使用方法

这是目前提议的 PSR-15 文档中定义的所有接口的集合。它可能会在未来改变,因为该文档仍在讨论中。

创建自己的中间件,例如使用

class MyMiddleWare implements ClientMiddlewareInterface
{
    public function process(RequestInterface $request, DelegateInterface $next)
    {
        return $next->next($request);
    }
}

查看 PSR-15 提议的定义。

安装

是 Composer 新手吗?

这将安装最新支持的版本

$ composer require legionth/http-middleware:^0.1

许可证

MIT