public addGenerator ( ) : self | ||
return | self |
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;
}