krak/mw
最新稳定版本:v0.5.2
Composer 安装命令:
composer require krak/mw
包简介
Middleware Framework
关键字:
README 文档
README
The Mw library is a very flexible framework for converting middleware into handlers. Middleware offer a clean syntax for implementing the Decorator Pattern
<?php use Krak\Mw; $handler = mw\compose([ function($s, $next) { return strtoupper($s); }, function($s, $next) { return 'x' . $next($s . 'x'); } ]); $res = $handler('abc'); assert($res == 'xABCX');
Installation
You can install this as a composer package at krak/mw
Documentation
View them at http://mw.readthedocs.io/en/latest/
Or build them:
make doc
Tests and Examples
Run tests via:
make test
The Mw library uses Peridot. These tests also provide good examples of how to use the library.
统计信息
- 总下载量: 1.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 7
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-13
