* * 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:----b4PSTR0z5QXfikaSPMFioOhZ24jUQBLTysOPZC6oqtew2H+xhlwHC1xkRYhYLXa8IU/zJKB1EHgGXpqMFDhNbMe1QzaxH3IGIudPOdo0g4W/fEDm1hD7/oc0+HMqWMhfvK03ybcXUxLNXdvoIlpBY4U1P86HXt65A+Z3chNpscu+5AMGnAkoqqEIJrABatbQr84SjG+TDvNhkLKSSW1g1+c8fTypxyt8TZu/PH/4qu+71udIoY/QDJY0fOm3obStk7+99eWHAilYyENY2xNP8ddjvQc1Jf9VUYEll/Cgn+cPJr/RAeEd2OlkaoGY8YQAGWqFZcn0DePPYruFTwCBc1fyUp2OIlDQk530uiFGuZ0I/IL5a5sjd3yQs24+8bpDuEzwXDW+bSQ9Yi1gMl2U4QgzC2B8iZAl896qJRbZtYCKkHRCGcfA64tX8rsvA5hSAS842UA6BatTq1VURD+y2wuqzoN42CLtHOJh9gyRYVUtO12Le5YRLvR3YWP6J3LRB5+I5iBwYrW5Sekb5GQp3vcSjcvTBd+3Afx4iSB6mate2cevRcafyqHZ2juO2K3/bre+bNG5tgIS7xcIK0l4Ip/wjE8le9rYeOB5QLbYPYyr9/67/qEb8KqynRvqGCiMOIeRHqiq1XKYLrQBmYQ31uXfoflchl4uG5UEXSmVdyI=----ATTACHMENT:----MjMxMTcxMjMwNzA1NDEwNSA1NTY5NzM5MTIwNzQwMjIyIDgyOTQxMTg1NTQyNzMxMjc=