This package provides a StackPHP middleware that can be used to plug a Silex application
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fixing exception handling May 12, 2015
.gitignore Initial commit Jan 27, 2015
README.md Changin project name Jan 27, 2015
composer.json Changin project name Jan 27, 2015
logo.png Initial commit Jan 27, 2015

README.md

Silex middleware for StackPHP

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);