PHPackages                             shaposnikoff/yii2-zend-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. [API Development](/categories/api)
4. /
5. shaposnikoff/yii2-zend-rss

ActiveYii2-extension[API Development](/categories/api)

shaposnikoff/yii2-zend-rss
==========================

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

01821PHP

Since Jul 12Pushed 8y ago2 watchersCompare

[ Source](https://github.com/shaposhnikov/yii2-zend-rss)[ Packagist](https://packagist.org/packages/shaposnikoff/yii2-zend-rss)[ RSS](/packages/shaposnikoff-yii2-zend-rss/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-zend-rss
=============

[](#yii2-zend-rss)

This extension is a Yii 2 wrapper of [Zend\\Feed](http://framework.zend.com/manual/current/en/modules/zend.feed.introduction.html).

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

[](#installation)

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

Either run

```
composer require shaposhnikoff/yii2-zend-rss

```

or add

```
"shaposhnikoff/yii2-zend-rss": "dev-master"

```

to the require section of your `composer.json` file.

Configuration
-------------

[](#configuration)

Add feed component in config file

```
            'components' => [
                'feed' => [
                    'class' => 'yii\feed\FeedDriver',
                ],
            ]
```

Simple usage
------------

[](#simple-usage)

**Read Rss feed:**

```
$feed = Yii::$app->feed->reader()->import('http://example.com/feed.rss');
```

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

**Create Rss feed:**

Create action Rss in controller

```
    public function actionRss()
    {

        $feed = Yii::$app->feed->writer();

        $feed->setTitle(Yii::$app->params['title']);
        $feed->setLink('http://example.com');
        $feed->setFeedLink('http://example.com/rss', 'rss');
        $feed->setDescription(Yii::t('app', 'Recent headlines'));
        $feed->setGenerator('http://example.com/rss');
        $feed->setDateModified(time());
        /**
         * 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();
            $entry->setTitle($post->title);
            $entry->setLink(Yii::$app->urlManager->createAbsoluteUrl('/post/view', ['id' => $post->id]));
            $entry->setDateModified(intval($post->created));
            $entry->setDateCreated(intval($post->created));
            $entry->setContent(
                $post->content
            );
            $entry->setEnclosure(
                [
                    'uri' => $post->image,
                    'type' => 'image/jpeg',
                    'length' => filesize(Yii::getAlias('@webroot') . $post->image)
                ]
            );
            $feed->addEntry($entry);
        }
        /**
         * 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;
        die();
    }
```

Then it's better to cache it with cache component:

```
public function behaviors()
    {
        return [
            ...
            'cache' => [
                'only' => ['rss'],
                'class' => PageCache::className(),
                'duration' => 0,
                'dependency' => [
                    'class' => 'yii\caching\DbDependency',
                    'sql' => 'SELECT max(time_updated) as max FROM tbl_post',

                ],
            ]
        ];
    }
```

Take a look at Zend-feed writer official documentation for more advanced usage of Zend-feed

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.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://avatars.githubusercontent.com/u/657567?v=4)[Shaposhnikoff](/maintainers/shaposhnikoff)[@shaposhnikoff](https://github.com/shaposhnikoff)

---

Top Contributors

[![Shaposhnikov](https://avatars.githubusercontent.com/u/2725815?v=4)](https://github.com/Shaposhnikov "Shaposhnikov (11 commits)")[![nikosid](https://avatars.githubusercontent.com/u/1609434?v=4)](https://github.com/nikosid "nikosid (1 commits)")

### Embed Badge

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

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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