定制 techworker/middleware 二次开发

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

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

techworker/middleware

Composer 安装命令:

composer require techworker/middleware

包简介

PSR-7 middleware function for building and dispatching middlewares.

README 文档

README

This library provides a single function to implement a PHP 7 middleware workflow for your PHP applications.

It is heavily inspired from the relay php implementation by Paul M. Jones

Usage

Import the function and define a list of middlewares.

<?php

use Psr7Middlewares\Middleware;
use Psr7Middlewares\Middleware\ErrorHandler;

use function Techworker\Functional\middleware;

/**
 * This function checks whether the 'Authorization' is given.
 */
$middleware1 = function(
    \Psr\Http\Message\ServerRequestInterface $request,
    \Psr\Http\Message\ResponseInterface $response,
    callable $next
) {
    return $next($request, $response);
};

$middlewares = [$middleware1, \Psr7Middlewares\Middleware::uuid()];

middleware($request, $response, $middlewares);

Installation

Add this to your composer.json

"require": {
	"techworker/middleware": "^1.0"
}

.. or use the following command on your command line:

composer require techworker/middleware

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固