2amigos/efeed
最新稳定版本:0.1.1
Composer 安装命令:
composer require 2amigos/efeed
包简介
Feed Writer Generator Extension to create your feeds. Currently supports RSS 1.0, RSS 2.0 and ATOM 1.0.
README 文档
README
Feed Writer Generator Extension to create your feeds. Currently supports RSS 1.0, RSS 2.0 and ATOM 1.0.
##Requirements
- Developed using Yii version 1.1.5
##Usage Unzip the contents of the package and place it on your protected/extensions folder.
Examples of use
RSS 1.0
Yii::import('ext.feed.*'); // specify feed type $feed = new EFeed(EFeed::RSS1); $feed->title = 'Testing the RSS 1 EFeed class'; $feed->link = 'http://www.ramirezcobos.com'; $feed->description = 'This is test of creating a RSS 1.0 feed by Universal Feed Writer'; $feed->RSS1ChannelAbout = 'http://www.ramirezcobos.com/about'; // create our item $item = $feed->createNewItem(); $item->title = 'The first feed'; $item->link = 'http://www.yiiframework.com'; $item->date = time(); $item->description = 'Amaz-ii-ng <b>Yii Framework</b>'; $item->addTag('dc:subject', 'Subject Testing'); $feed->addItem($item); $feed->generateFeed(); RSS 2.0
Yii::import('ext.feed.*'); // RSS 2.0 is the default type $feed = new EFeed(); $feed->title= 'Testing RSS 2.0 EFeed class'; $feed->description = 'This is test of creating a RSS 2.0 Feed'; $feed->setImage('Testing RSS 2.0 EFeed class','http://www.ramirezcobos.com/rss', 'http://www.yiiframework.com/forum/uploads/profile/photo-7106.jpg'); $feed->addChannelTag('language', 'en-us'); $feed->addChannelTag('pubDate', date(DATE_RSS, time())); $feed->addChannelTag('link', 'http://www.ramirezcobos.com/rss' ); // * self reference $feed->addChannelTag('atom:link','http://www.ramirezcobos.com/rss/'); $item = $feed->createNewItem(); $item->title = "first Feed"; $item->link = "http://www.yahoo.com"; $item->date = time(); $item->description = 'This is test of adding CDATA Encoded description <b>EFeed Extension</b>'; // this is just a test!! $item->setEncloser('http://www.tester.com', '1283629', 'audio/mpeg'); $item->addTag('author', 'thisisnot@myemail.com (Antonio Ramirez)'); $item->addTag('guid', 'http://www.ramirezcobos.com/',array('isPermaLink'=>'true')); $feed->addItem($item); $feed->generateFeed(); Yii::app()->end(); ATOM 1.0
Yii::import('ext.feed.*'); $feed = new EFeed(EFeed::ATOM); // IMPORTANT : No need to add id for feed or channel. It will be automatically created from link. $feed->title = 'Testing the ATOM RSS EFeed class'; $feed->link = 'http://www.ramirezcobos.com'; $feed->addChannelTag('updated', date(DATE_ATOM, time())); $feed->addChannelTag('author', array('name'=>'Antonio Ramirez Cobos')); $item = $feed->createNewItem(); $item->title = 'The first Feed'; $item->link = 'http://www.ramirezcobos.com'; // we can also insert well formatted date strings $item->date ='2010/24/12'; $item->description = 'Test of CDATA Encoded description <b>EFeed Extension</b>'; $feed->addItem($item); $feed->generateFeed(); ##Change Log
- v.1.3 Added stylesheet support
- v.1.2 Added support for atom:link
- v.1.1 Fixed bug on EFeedItemAtom thanks to Flokey82
##Resources
2amigos/efeed 适用场景与选型建议
2amigos/efeed 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 48.93k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「atom」 「feed」 「rss」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 2amigos/efeed 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 2amigos/efeed 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 2amigos/efeed 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Symfony bundle for Mutex implementation for PHP
Simple RSS generator library for PHP 5.5 or later. clone from Bhaktaraz Bhatta ttps://github.com/bhaktaraz/php-rss-generator
Generator for Atom, JSON and RSS feeds in TYPO3
Atom feed generator
Import an RSS-feed into blog
Google Shopping Feed API (with ns problem fixed)
统计信息
- 总下载量: 48.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-01-04