Class

Symfony\Component\HttpKernel\EventListener\ProfilerListener

class ProfilerListener implements EventSubscriberInterface

ProfilerListener collects data for the current request by listening to the onKernelResponse event.

Methods

__construct(Profiler $profiler, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false, RequestStack $requestStack = null)

Constructor.

onKernelException(GetResponseForExceptionEvent $event)

Handles the onKernelException event.

onKernelRequest(GetResponseEvent $event)

onKernelResponse(FilterResponseEvent $event)

Handles the onKernelResponse event.

onKernelTerminate(PostResponseEvent $event)

static array getSubscribedEvents()

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

Details

at line 49
public __construct(Profiler $profiler, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false, RequestStack $requestStack = null)

Constructor.

Parameters

Profiler $profiler
RequestMatcherInterface $matcher
$onlyException
$onlyMasterRequests
RequestStack $requestStack

at line 65
public onKernelException(GetResponseForExceptionEvent $event)

Handles the onKernelException event.

Parameters

GetResponseForExceptionEvent $event A GetResponseForExceptionEvent instance

at line 77
public onKernelRequest(GetResponseEvent $event)

Parameters

GetResponseEvent $event

at line 89
public onKernelResponse(FilterResponseEvent $event)

Handles the onKernelResponse event.

Parameters

FilterResponseEvent $event A FilterResponseEvent instance

at line 124
public onKernelTerminate(PostResponseEvent $event)

Parameters

PostResponseEvent $event

at line 146
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