class HtmlResponseBigPipeSubscriber implements EventSubscriberInterface (View source)

Response subscriber to replace the HtmlResponse with a BigPipeResponse.

Refactor once https://www.drupal.org/node/2577631 lands.

Properties

protected BigPipe $bigPipe

The BigPipe service.

Methods

__construct(BigPipe $big_pipe)

Constructs a HtmlResponseBigPipeSubscriber object.

onRespondEarly(ResponseEvent $event)

Adds markers to the response necessary for the BigPipe render strategy.

onRespond(ResponseEvent $event)

Transforms a HtmlResponse to a BigPipeResponse.

getBigPipeService(ResponseEvent $event)

Returns the BigPipe service to use to send the current response.

static 
getSubscribedEvents()

{@inheritdoc}

Details

__construct(BigPipe $big_pipe)

Constructs a HtmlResponseBigPipeSubscriber object.

Parameters

BigPipe $big_pipe

The BigPipe service.

onRespondEarly(ResponseEvent $event)

Adds markers to the response necessary for the BigPipe render strategy.

Parameters

ResponseEvent $event

The event to process.

onRespond(ResponseEvent $event)

Transforms a HtmlResponse to a BigPipeResponse.

Parameters

ResponseEvent $event

The event to process.

protected BigPipe getBigPipeService(ResponseEvent $event)

Returns the BigPipe service to use to send the current response.

Parameters

ResponseEvent $event

A response event.

Return Value

BigPipe

The BigPipe service.

static getSubscribedEvents()

{@inheritdoc}