Class

Symfony\Component\HttpKernel\EventListener\EsiListener

class EsiListener implements EventSubscriberInterface

EsiListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for ESI.

Methods

__construct(Esi $esi = null)

Constructor.

onKernelResponse(FilterResponseEvent $event)

Filters the Response.

static array getSubscribedEvents()

Returns an array of event names this subscriber wants to listen to.

Details

at line 33
public __construct(Esi $esi = null)

Constructor.

Parameters

Esi $esi An ESI instance

at line 43
public onKernelResponse(FilterResponseEvent $event)

Filters the Response.

Parameters

FilterResponseEvent $event A FilterResponseEvent instance

at line 52
static public array getSubscribedEvents()

Returns an array of event names this subscriber wants to listen to.

The array keys are event names and the value can be:

For instance:

Return Value

array The event names to listen to