public function onKernelView(GetResponseForControllerResultEvent $event)
    {
        $controllerResult = $event->getControllerResult();

        if (!$controllerResult instanceof ResponseInterface) {
            return;
        }

        $event->setResponse($this->httpFoundationFactory->createResponse($controllerResult));
    }
public function onKernelView(GetResponseForControllerResultEvent $event)
    {
        $controllerResult = $event->getControllerResult();

        if (!$controllerResult instanceof ResponseInterface) {
            return;
        }

        $event->setResponse($this->httpFoundationFactory->createResponse($controllerResult));
    }
public function onKernelView ( GetResponseForControllerResultEvent $ event ) { $ controllerResult = $ event -> getControllerResult ( ) ; if ( ! $ controllerResult instanceof ResponseInterface ) { return ; } $ event -> setResponse ( $ this -> httpFoundationFactory -> createResponse ( $ controllerResult ) ) ; }
Do the conversion if applicable and update the response of the event.
Do the conversion if applicable and update the response of the event .