src/Control/RSS/RSSFeed.php
public function outputToBrowser()
    {
        $prevState = SSViewer::config()->uninherited('source_file_comments');
        SSViewer::config()->update('source_file_comments', false);

        $response = Controller::curr()->getResponse();

        if (is_int($this->lastModified)) {
            HTTPCacheControlMiddleware::singleton()->registerModificationDate($this->lastModified);
            $response->addHeader("Last-Modified", gmdate("D, d M Y H:i:s", $this->lastModified) . ' GMT');
        }
        if (!empty($this->etag)) {
            $response->addHeader('ETag', "\"{$this->etag}\"");
        }

        $response->addHeader("Content-Type", "application/rss+xml; charset=utf-8");

        SSViewer::config()->update('source_file_comments', $prevState);
        return $this->renderWith($this->getTemplates());
    }
public function outputToBrowser()
    {
        $prevState = SSViewer::config()->uninherited('source_file_comments');
        SSViewer::config()->update('source_file_comments', false);

        $response = Controller::curr()->getResponse();

        if (is_int($this->lastModified)) {
            HTTPCacheControlMiddleware::singleton()->registerModificationDate($this->lastModified);
            $response->addHeader("Last-Modified", gmdate("D, d M Y H:i:s", $this->lastModified) . ' GMT');
        }
        if (!empty($this->etag)) {
            $response->addHeader('ETag', "\"{$this->etag}\"");
        }

        $response->addHeader("Content-Type", "application/rss+xml; charset=utf-8");

        SSViewer::config()->update('source_file_comments', $prevState);
        return $this->renderWith($this->getTemplates());
    }
public function outputToBrowser ( ) { $ prevState = SSViewer :: config ( ) -> uninherited ( 'source_file_comments' ) ; SSViewer :: config ( ) -> update ( 'source_file_comments' , false ) ; $ response = Controller :: curr ( ) -> getResponse ( ) ; if ( is_int ( $ this -> lastModified ) ) { HTTPCacheControlMiddleware :: singleton ( ) -> registerModificationDate ( $ this -> lastModified ) ; $ response -> addHeader ( "Last-Modified" , gmdate ( "D, d M Y H:i:s" , $ this -> lastModified ) . ' GMT' ) ; } if ( ! empty ( $ this -> etag ) ) { $ response -> addHeader ( 'ETag' , "\"{$this->etag}\"" ) ; } $ response -> addHeader ( "Content-Type" , "application/rss+xml; charset=utf-8" ) ; SSViewer :: config ( ) -> update ( 'source_file_comments' , $ prevState ) ; return $ this -> renderWith ( $ this -> getTemplates ( ) ) ; }
Output the feed to the browser.

TODO: Pass $response object to ->outputToBrowser() to loosen dependence on global state for easier testing/prototyping so dev can inject custom HTTPResponse instance.

@return DBHTMLText
Output the feed to the browser .