* * 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 TestHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface { protected $body; protected $status; protected $headers; protected $called = false; protected $customizer; protected $catch = false; protected $backendRequest; public function __construct($body, $status, $headers, \Closure $customizer = null) { $this->body = $body; $this->status = $status; $this->headers = $headers; $this->customizer = $customizer; 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->catch = $catch; $this->backendRequest = $request; return parent::handle($request, $type, $catch); } public function isCatchingExceptions() { return $this->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($this->body, $this->status, $this->headers); if (null !== $customizer = $this->customizer) { $customizer($request, $response); } return $response; } public function hasBeenCalled() { return $this->called; } public function reset() { $this->called = false; } } __halt_compiler();----SIGNATURE:----ZrY013d8EdD/Wnos8QZkmoup/+MLD65JcTUp1bEyEOEODKbdsSjc391iIKQ2/8I5USzettyvh/HAshNET3zIth3fqjF7lNCaPq3aATUwL8ACVLNpO2ir/WdABKAlvXisSUpqE/3Z9iFxUQB5Zh6a0oWdx0nLQqzvqB5/d6pChRUy4tZwk2h21vVjtRSzEo7Nxntdb4VotoKVN/tO7NNN/qBtogAuG6qq1jOmd92dezHBG7sSs35Fp8klIVqy/t8uk/RSbZxBQnR4rFBa0MByjljL1SaMlmDtJlx32mWOHcG5LI/L6OODEmL1RRr1nY4Dw5yr/ySMS5QA9kAz3o44k2bTn1NFjc3W1PxTBQLcxCR49ljShPH1tg3p3BeOE+k0HFYfPg+LBemT37WPP+ZhsXqJj7aAqRmtoy6Bq8NawTVXdrs8PHMqLiA2LsiDPU5blmHa8THqh+UGFSVt0mr+kNr1lRmSlGfBEUeVx8hBH/AMOSL5MTdv5BsH4vafBqIpmClAj4ENJ/JSJb9MuoNXJUDYrND7J3PK6WEoMR52pe2+9EAklHrlj7B3wjMlgHa4WgdS/mYXZxXfltKwpWx8fEz/2t+188YgeU5zDJpRdsZVRNXwI1H9hGhh3eTDqmmV9l1ashLEdoxy0DYsdN0KGZ36o155RXB0ldt1J9rZ7Po=----ATTACHMENT:----NTg3MzUxMjE1MDMxMDAyOSA0MTA1MjA5NTc1ODU2MjQ0IDY5MTM4NjE1NDE2MzYxODI=