| Server IP : 146.70.56.164 / Your IP : 216.73.217.104 Web Server : LiteSpeed System : Linux buc03.virtono.com 4.18.0-348.23.1.lve.el8.x86_64 #1 SMP Wed Apr 27 06:58:00 EDT 2022 x86_64 User : iasiro ( 1486) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/iasiro/ |
Upload File : |
<?php
namespace Stack;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class StackedHttpKernel implements HttpKernelInterface, TerminableInterface
{
private $app;
private $middlewares = array();
public function __construct(HttpKernelInterface $app, array $middlewares)
{
$this->app = $app;
$this->middlewares = $middlewares;
}
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
return $this->app->handle($request, $type, $catch);
}
public function terminate(Request $request, Response $response)
{
foreach ($this->middlewares as $kernel) {
if ($kernel instanceof TerminableInterface) {
$kernel->terminate($request, $response);
}
}
}
}