* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Tests\HttpCache; use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; use Symfony\Component\EventDispatcher\EventDispatcher; class TestMultipleHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface { protected $bodies = array(); protected $statuses = array(); protected $headers = array(); protected $called = false; protected $backendRequest; public function __construct($responses) { foreach ($responses as $response) { $this->bodies[] = $response['body']; $this->statuses[] = $response['status']; $this->headers[] = $response['headers']; } parent::__construct(new EventDispatcher(), $this, null, $this); } public function getBackendRequest() { return $this->backendRequest; } public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = false) { $this->backendRequest = $request; return parent::handle($request, $type, $catch); } public function getController(Request $request) { return array($this, 'callController'); } public function getArguments(Request $request, $controller) { return array($request); } public function callController(Request $request) { $this->called = true; $response = new Response(array_shift($this->bodies), array_shift($this->statuses), array_shift($this->headers)); return $response; } public function hasBeenCalled() { return $this->called; } public function reset() { $this->called = false; } } __halt_compiler();----SIGNATURE:----bHMSddRSqFvWdL6QU4tFeNfZGgObqNhwMHBnJckPMX4zrYUSY5x0Gp5IJtVfXhm0djq3qZaA1J1mpHsp8HpSCrPzMHkbINzbFREenEwLIRoJkpb7dQ1WAW4QkWcu4MhGxgEWeSZR/qP5EUE1d/q1m4yKruKCviNLNxU7PZ7KsgEN3g6z7A2/zonkVBihbjyCZHRM9XWwjtq1mJdoWoo7gdi/sAj5Fzmhk0UPqrFvKCTXmSEbc1hNxm1C9dKoNpvRLKLQixHxNqrqgQH20mxLNau7tvbLcdWB9z7yU07b4PR9aXGdO+9M1lIY6ZEsjH+Ikzl7iTO08odUQquA5Hv00zDMGCDD428TI8QtiAbWM8YumVfRoHM0cZv5BiFZ+PQ7o2ewkTbMF74BPEDEJKIXuAqDXqefOiO7STE7jUhgG5jpvJoNrrboaq/qqu5VOV8C+KP0EklD30ejeMmpHSpU3f2Spu9iEEpou2S9l7TcvUBoBXuYRhgG7lTpvis17/lNV7TtVkEOytb4SHnb111aVAZvpc0g8cID0Svz+UouOT+jX5cRlQSgHnRnFh/Uk3yOy7w3E3FOKaInUhvLZXct/kbG6Fe7bPVs6RzTwj4HanumaGWfLJU4r0KdcG2uJp9ippgLEBHnF3ds9s/BGghzZRL1JVzx587a7saVlZRR+Ko=----ATTACHMENT:----MzIzNTY2NzgwOTM1NjcyNCA2MTE5ODQ3ODg3Mzk3NzIyIDEyMDIyMjEwMTQ0OTU0NjU=