承接 mouf/symfony-middleware 相关项目开发

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

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

mouf/symfony-middleware

最新稳定版本:v0.1.0

Composer 安装命令:

composer require mouf/symfony-middleware

包简介

This package provides a StackPHP middleware that can be used to use a Symfony application as a middleware (instead of an app)

README 文档

README

This package contains a StackPHP middleware that enables you to push a Symfony application (actually a Kernel) directly on the middleware stack. The Symfony application will try to handle requests but instead of sending a 404 response if no route is found, the next middleware on the stack will be called.

Installation

Through Composer as mouf/symfony-middleware.

Usage

Simply use the SymfonyMiddleWare class in your middleware stack:

use Mouf\StackPhp\SymfonyMiddleware;
use My\Symfony\Application;
use Stack\Builder;

$app = ...

$symfonyApplication = new Application(...);

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

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

Why?

Why would I want to make a Symfony app a middleware? Because if every app becomes a middleware, we can easily chain middlewares together, and therefore, chain many frameworks in the same application... and this is cool :)

统计信息

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

GitHub 信息

  • Stars: 23
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

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