Class

eZ\Bundle\EzPublishRestBundle\EventListener\ResponseListener

class ResponseListener implements EventSubscriberInterface

REST Response Listener.

Converts responses from REST controllers to REST Responses, depending on the Accept-Header value.

Methods

__construct(AcceptHeaderVisitorDispatcher $viewDispatcher)

static array getSubscribedEvents()

onKernelResultView(GetResponseForControllerResultEvent $event)

onKernelExceptionView(GetResponseForExceptionEvent $event)

Details

at line 32
public __construct(AcceptHeaderVisitorDispatcher $viewDispatcher)

Parameters

AcceptHeaderVisitorDispatcher $viewDispatcher AcceptHeaderVisitorDispatcher

at line 40
static public array getSubscribedEvents()

Return Value

array

at line 52
public onKernelResultView(GetResponseForControllerResultEvent $event)

Parameters

GetResponseForControllerResultEvent $event

at line 72
public onKernelExceptionView(GetResponseForExceptionEvent $event)

Parameters

GetResponseForExceptionEvent $event

Exceptions

Exception