* * 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:----djUMDR4NK+yekq9xOz9Mz4GYjdqtfHln0m3WFeM8Q++KsHpMg98hS2B8HFco3Gl+OIrVwHZHTDEAU6sBYkmklvabHB290827NNAAOxho3irI3Wv4fF/ELleRTpgdpNZVvJpZfdZ23cXvgDFcvw1kf+aHIIXr9UeW7vyZGQThYPVrZfkAdRo/26f6uxxYZOub+mzgzOj6O/D/VE3qMafB8WbcL/ow5b/vUbHYlQ/YzW49H0y5frpPACJKoBRnXvVHuffzq06myd8llhUrTroSNvF+Oxc6BiBCJJjrfPfm6rI/RTnfglYr5R8vlAWYzwb2KMzoaWUCl7Vj9HNl+FOAAnpbSKuWUqOV523fJVBKxmG65tH3ThywGf/SmvOZEh7isIk4bQ9BgitQKA59An4hyfM3DBZ7X7unGVgB2GR25cKCKf0MJk8tx3H1obMnpHfWKYM5inNK4Iu5bJAeu90uSZRhD0Xm78qirYWTVqW1HWvbw0ZWLzJWyqO5lo2RJt1EXK1v9uMPeWDlJrURCIZjT02O0cRphEFn64yto4T9I9OugdaZEObAZjMg7/MlzMbp//6UtFY01NTQ500tRP8OQyGtqOI+Cx4FUgjyXWVUWVYtLYK01rerV0CPxH94GCe8d5LIjGxgHGFdMH5AxXcSn2tJFvxdnX9s6TLdv9cMMX8=----ATTACHMENT:----NjIyMjk4NDA1NTYzMzcwIDU5MTQ2MTkxNzAwNTYxNzQgNTA5MzQzMDU3MDU1NTM3OA==