Helthe\Component\Turbolinks\StackTurbolinks::handle PHP Метод

handle() публичный Метод

public handle ( Request $request, $type = self::MASTER_REQUEST, $catch = true )
$request Symfony\Component\HttpFoundation\Request
    public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true)
    {
        $response = $this->app->handle($request, $type, $catch);
        if (self::MASTER_REQUEST === $type) {
            $this->turbolinks->decorateResponse($request, $response);
        }
        return $response;
    }

Usage Example

Пример #1
0
 public function testDoesSomethingForMasterRequests()
 {
     $app = $this->getDecoratedAppMock();
     $turbolinks = $this->getTurbolinksMock();
     $turbolinks->expects($this->once())->method('decorateResponse');
     $stack = new StackTurbolinks($app, $turbolinks);
     $stack->handle(new Request(), HttpKernelInterface::MASTER_REQUEST);
 }
StackTurbolinks