public function addGenerator()
    {
        if ($this->version == Feed::ATOM)
            $this->setChannelElement('atom:generator', 'FeedWriter', array('uri' => 'https://github.com/mibe/FeedWriter'));
        else if ($this->version == Feed::RSS2)
            $this->setChannelElement('generator', 'FeedWriter');
        else
            throw new InvalidOperationException('The generator element is not supported in RSS1 feeds.');

        return $this;
    }
public function addGenerator()
    {
        if ($this->version == Feed::ATOM)
            $this->setChannelElement('atom:generator', 'FeedWriter', array('uri' => 'https://github.com/mibe/FeedWriter'));
        else if ($this->version == Feed::RSS2)
            $this->setChannelElement('generator', 'FeedWriter');
        else
            throw new InvalidOperationException('The generator element is not supported in RSS1 feeds.');

        return $this;
    }
public function addGenerator ( ) { if ( $ this -> version == Feed :: ATOM ) $ this -> setChannelElement ( 'atom:generator' , 'FeedWriter' , array ( 'uri' => 'https://github.com/mibe/FeedWriter' ) ) ; else if ( $ this -> version == Feed :: RSS2 ) $ this -> setChannelElement ( 'generator' , 'FeedWriter' ) ; else throw new InvalidOperationException ( 'The generator element is not supported in RSS1 feeds.' ) ; return $ this ; }
Add a channel element indicating the program used to generate the feed.

@return   self
@throws   InvalidOperationException if this method is called on an RSS1 feed.
Add a channel element indicating the program used to generate the feed .