Файл: gapps/vendor/symfony/http-kernel/Tests/TestHttpKernel.php
Строк: 72
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SymfonyComponentHttpKernelTests;
use SymfonyComponentHttpKernelHttpKernel;
use SymfonyComponentHttpFoundationRequest;
use SymfonyComponentHttpFoundationResponse;
use SymfonyComponentHttpKernelControllerControllerResolverInterface;
use SymfonyComponentEventDispatcherEventDispatcher;
class TestHttpKernel extends HttpKernel implements ControllerResolverInterface
{
public function __construct()
{
parent::__construct(new EventDispatcher(), $this);
}
public function getController(Request $request)
{
return array($this, 'callController');
}
public function getArguments(Request $request, $controller)
{
return array($request);
}
public function callController(Request $request)
{
return new Response('Request: '.$request->getRequestUri());
}
}