![]() |
|
sfRSSPlugin - 0.0.1simple RSS feed creation |
|
Simple plugin to create RSS feeds
To install:
$ symfony plugin-install http://plugins.symfony-project.com/sfRSSPlugin
or
$ symfony plugin:install sfRSSPlugin
Enable plugin in ProjectConfiguration.class.php :
$this->enablePlugins('sfRSSPlugin');
To create your feed create action, where rss would be and add next lines:
$rssCreator=new sfRSSCreator(array('title'=>'Title of your feed'));
$rssCreator->addArticle('Title of your article', 'It's URL', 'It's description', 'category', 'publication time');
//don't forget to send headers
$response=$this->getResponse();
$response->setContentType('application/rss+xml');
return $this->renderText($rssCreator->getStreamContent());
For the full copyright and license information, please view the LICENSE file that was distributed with this source code.