PHP code example of mouf / symfony-middleware

1. Go to this page and download the library: Download mouf/symfony-middleware library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mouf / symfony-middleware example snippets


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