定制 hannesvdvreken/route-middleware 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hannesvdvreken/route-middleware

最新稳定版本:0.1.0

Composer 安装命令:

composer require hannesvdvreken/route-middleware

包简介

README 文档

README

Abandoned. Don't use this and don't send pull requests.

PSR-7 middleware for league/route

Latest Version Software License Build Status Coverage Status Quality Score

PSR-7 compatible Middleware for league/route's RouteCollection.

Installation

composer require hannesvdvreken/route-middleware

Description

This package aims to provide an easy to use middleware that takes PSR-7 Request object and converts it to a Response object by calling the Route's dispatcher class.

use League\Route\RouteCollection;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\RequestInterface;

$router = new RouteCollection();

// Setup router
$router->addRoute('GET', '/robots.txt', function (RequestInterface $request, ResponseInterface $response) {
    // Adjust the response
    return $response;
});

$app = new League\Route\Stack\Middleware($router);

$response = $app->handle($request);

Contributing

Contributions are welcome. See the contributions file to know how to contribute.

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-09