nckg / feedme
此包的最新版本(dev-master)没有可用的许可信息。
RSS订阅生成库
dev-master
2014-10-13 13:14 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2024-09-27 01:44:02 UTC
README
安装
如果使用Composer管理项目依赖,只需在项目的composer.json文件中添加对nckg/feedme
的依赖。
{
"require-dev": {
"nckg/feedme": "dev-master"
}
}
使用方法
$feed = new Feed; $channel = new Channel; $channel ->setTitle('An RSS channel') ->setFeedUri('http://www.w3.org') ->setWebsiteUri('http://github.com/nckg/feedme') ->setDescription('My RSS channel') ->setLanguage('nl-BE'); $item = new Item(); $item ->setTitle('My first blog post') ->setPublicationDate($date) ->setDescription('Foobar'); $channel->addItem($item); $feed->addChannel($channel); echo $feed->render();