public function render($format)
    {
        if (!isset($this->formatters[$format])) {
            throw new \InvalidArgumentException(
                sprintf("Unable to find a formatter service for format '%s'.", $format)
            );
        }

        $formatter = $this->formatters[$format];
        $formatter->setFeed($this);

        return $formatter->render();
    }
public function render($format)
    {
        if (!isset($this->formatters[$format])) {
            throw new \InvalidArgumentException(
                sprintf("Unable to find a formatter service for format '%s'.", $format)
            );
        }

        $formatter = $this->formatters[$format];
        $formatter->setFeed($this);

        return $formatter->render();
    }
public function render ( $ format ) { if ( ! isset ( $ this -> formatters [ $ format ] ) ) { throw new \ InvalidArgumentException ( sprintf ( "Unable to find a formatter service for format '%s'." , $ format ) ) ; } $ formatter = $ this -> formatters [ $ format ] ; $ formatter -> setFeed ( $ this ) ; return $ formatter -> render ( ) ; }
Render the feed in specified format.

@param string $format The format to render (RSS, Atom, ...)

@throws \InvalidArgumentException if given format formatter does not exists

@return string
Render the feed in specified format .