public function injectResponse(ViewEvent $e)
    {
        $renderer = $e->getRenderer();

        if ($renderer !== $this->renderer) {
            return;
        }

        $result   = $e->getResult();

        /** @var HttpResponse $response */
        $response = $e->getResponse();
        $response->setContent($result);
        $headers = $response->getHeaders();
        //$headers->addHeaderLine('Content-length', strlen($result));
        $headers->addHeaderLine('content-type', 'text/xml');
    }
public function injectResponse(ViewEvent $e)
    {
        $renderer = $e->getRenderer();

        if ($renderer !== $this->renderer) {
            return;
        }

        $result   = $e->getResult();

        /** @var HttpResponse $response */
        $response = $e->getResponse();
        $response->setContent($result);
        $headers = $response->getHeaders();
        //$headers->addHeaderLine('Content-length', strlen($result));
        $headers->addHeaderLine('content-type', 'text/xml');
    }
public function injectResponse ( ViewEvent $ e ) { $ renderer = $ e -> getRenderer ( ) ; if ( $ renderer !== $ this -> renderer ) { return ; } $ result = $ e -> getResult ( ) ; /** @var HttpResponse $response */ $ response = $ e -> getResponse ( ) ; $ response -> setContent ( $ result ) ; $ headers = $ response -> getHeaders ( ) ; //$headers->addHeaderLine('Content-length', strlen($result)); $ headers -> addHeaderLine ( 'content-type' , 'text/xml' ) ; }
Inject the response with the feed payload and appropriate Content-Type header

@param  ViewEvent $e
@return void
@throws \Zend\Http\Exception\InvalidArgumentException
Inject the response with the feed payload and appropriate Content - Type header