There is no license information available for the latest version (1.0.1) of this package.

Sistema AMOS per RSS

1.0.1 2022-09-13 12:32 UTC

This package is auto-updated.

Last update: 2023-11-15 12:20:14 UTC


Amos Framework extension to provide functionality for consuming RSS and Atom feeds using zend-feed library.


  		"open20/amos-rss": "~1.0.0"


In config file


Add feed component

'components' => array(
        'rss' => array(
        	 	'class' => 'amos\rss\components\RssFeed',

Simple usage

Read Rss feed:


This will get RSS feed, parse it and return feed object. For more details you can read the official Zend-feed extention documentaion:

Create Rss feed:

Create action Rss in controller

public function actionRss(){
		$feed->setFeedLink('', 'rss');
		$feed->setDescription(Yii::t('app','Recent headlines'));
		* Add one or more entries. Note that entries must
		* be manually added once created.
		$posts=Post::find()->orderBy('id DESC')->limit(20)->all();
		foreach($posts as $post){
				$entry = $feed->createEntry();
		* Render the resulting feed to Atom 1.0 and assign to $out.
		* You can substitute "atom" with "rss" to generate an RSS 2.0 feed.
		$out = $feed->export('rss');
		header('Content-type: text/xml');
		echo $out;

add rss migrations to console modules (console/config/migrations-amos.php):

add rss module to backend modules (backend/config/modules-amos.php):

'rss' => [ 'class' => 'amos\rss\Module', 'modelsEnabled' => [ 'open20\amos\news\models\News', ], 'federationUrls' => [ '' ] ],