mouf/silex-middleware 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mouf/silex-middleware

Composer 安装命令:

composer require mouf/silex-middleware

包简介

This package provides a StackPHP middleware that can be used to plug a Silex application

README 文档

README

This package contains a StackPHP middleware that unables you to push a Silex application directly on the middleware stack. The Silex application will try to handle requests but instead of sending a 404 response if nothing is found, the next middleware on the stack will be called.

Installation

Through Composer as mouf/silex-middleware.

Usage

Simply use the SilexMiddleWare class in your middleware stack:

use Mouf\StackPhp\SilexMiddleware;
use Silex\Application;
use Stack\Builder;

$app = ...

$silex = new Silex\Application();
$silex->get('/hello', function(Request $request) {
    return 'Hello World!';
});

$stack = (new Stack\Builder())
    ->push(SilexMiddleWare::class, $silex);

$app = $stack->resolve($app);

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 15
  • Forks: 1
  • 开发语言: PHP

其他信息

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