PHPackages                             abdulazizhuja/yii2-rss - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. abdulazizhuja/yii2-rss

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

abdulazizhuja/yii2-rss
======================

Yii2 RSS extension adds RSS-feed to your site

00PHP

Since Nov 7Pushed 3y agoCompare

[ Source](https://github.com/abdulazizhuja/yii2-rss)[ Packagist](https://packagist.org/packages/abdulazizhuja/yii2-rss)[ RSS](/packages/abdulazizhuja-yii2-rss/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 RSS extension
==================

[](#yii2-rss-extension)

[Yii2](http://www.yiiframework.com) RSS extension adds RSS-feed to your site

Installation
------------

[](#installation)

### Composer

[](#composer)

The preferred way to install this extension is through [Composer](http://getcomposer.org/).

Either run

```
php composer.phar require zelenin/yii2-rss "~0.1"

```

or add

```
"zelenin/yii2-rss": "~0.1"

```

to the require section of your `composer.json`

Usage
-----

[](#usage)

Add action to your controller:

```
public function actionRss()
{
    $dataProvider = new ActiveDataProvider([
        'query' => Post::find()->with(['user']),
        'pagination' => [
            'pageSize' => 10
        ],
    ]);

    $response = Yii::$app->getResponse();
    $headers = $response->getHeaders();

    $headers->set('Content-Type', 'application/rss+xml; charset=utf-8');

    echo \Zelenin\yii\extensions\Rss\RssView::widget([
        'dataProvider' => $dataProvider,
        'channel' => [
            'title' => function ($widget, \Zelenin\Feed $feed) {
                    $feed->addChannelTitle(Yii::$app->name);
            },
            'link' => Url::toRoute('/', true),
            'description' => 'Posts ',
            'language' => function ($widget, \Zelenin\Feed $feed) {
                return Yii::$app->language;
            },
            'image'=> function ($widget, \Zelenin\Feed $feed) {
                $feed->addChannelImage('http://example.com/channel.jpg', 'http://example.com', 88, 31, 'Image description');
            },
        ],
        'items' => [
            'title' => function ($model, $widget, \Zelenin\Feed $feed) {
                    return $model->name;
                },
            'description' => function ($model, $widget, \Zelenin\Feed $feed) {
                    return StringHelper::truncateWords($model->content, 50);
                },
            'link' => function ($model, $widget, \Zelenin\Feed $feed) {
                    return Url::toRoute(['post/view', 'id' => $model->id], true);
                },
            'author' => function ($model, $widget, \Zelenin\Feed $feed) {
                    return $model->user->email . ' (' . $model->user->username . ')';
                },
            'guid' => function ($model, $widget, \Zelenin\Feed $feed) {
                    $date = \DateTime::createFromFormat('Y-m-d H:i:s', $model->updated_at);
                    return Url::toRoute(['post/view', 'id' => $model->id], true) . ' ' . $date->format(DATE_RSS);
                },
            'pubDate' => function ($model, $widget, \Zelenin\Feed $feed) {
                    $date = \DateTime::createFromFormat('Y-m-d H:i:s', $model->updated_at);
                    return $date->format(DATE_RSS);
                }
        ]
    ]);
}
```

Author
------

[](#author)

[Aleksandr Zelenin](https://github.com/zelenin/), e-mail:

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 72.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/688b548ae70b0df47e0e65ee80dab7f2e30e1827b54daf99ce530df923416974?d=identicon)[abdulazizhuja](/maintainers/abdulazizhuja)

---

Top Contributors

[![zelenin](https://avatars.githubusercontent.com/u/1427885?v=4)](https://github.com/zelenin "zelenin (8 commits)")[![abdulazizhuja](https://avatars.githubusercontent.com/u/14832886?v=4)](https://github.com/abdulazizhuja "abdulazizhuja (2 commits)")[![beowulfenator](https://avatars.githubusercontent.com/u/5413344?v=4)](https://github.com/beowulfenator "beowulfenator (1 commits)")

### Embed Badge

![Health badge](/badges/abdulazizhuja-yii2-rss/health.svg)

```
[![Health](https://phpackages.com/badges/abdulazizhuja-yii2-rss/health.svg)](https://phpackages.com/packages/abdulazizhuja-yii2-rss)
```

###  Alternatives

[yireo/magento2-extensionchecker

Scan the code of a Magento module

96151.6k3](/packages/yireo-magento2-extensionchecker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
