承接 mehr-it/eli-middleware-chain 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mehr-it/eli-middleware-chain

Composer 安装命令:

composer require mehr-it/eli-middleware-chain

包简介

Chaining for PSR-15 middleware

README 文档

README

Latest Version on Packagist Build Status

When defining a request processing chain, usually more than one middleware is involved into the processing chain. The ChainHandler allows to define the PSR-15 middleware processing stack as array or iterator:

$chain = new ChainHandler([
      new MiddlewareA(),
      new MiddlewareB(),
], $next); 

This makes code much more readable and allows easy dynamic configuration of the middleware chain.

To create middleware instances on the fly - only when needed - resolver functions may be used:

$chain = new ChainHandler([
      function() { return new MiddlewareA(); },
      function() { return new MiddlewareB(); },
], $next); 

Middleware instead of handler

Sometimes a middleware chain is required as middleware itself. The ChainMiddleware can be used for such purposes. It's usage is straightforward as the ChainHandler:

$chain = new ChainMiddleware([
      new MiddlewareA(),
      new MiddlewareB(),
]); 

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固