class RenderArrayNonHtmlSubscriber implements EventSubscriberInterface (View source)

Throws 406 if requesting non-HTML format and controller returns render array.

Methods

onRespond(ViewEvent $event)

Throws an HTTP 406 error if client requested a non-HTML format.

static array
getSubscribedEvents()

{@inheritdoc}

Details

onRespond(ViewEvent $event)

Throws an HTTP 406 error if client requested a non-HTML format.

Parameters

ViewEvent $event

The event to process.

static array getSubscribedEvents()

{@inheritdoc}

Return Value

array