nckg/feedme

此包的最新版本(dev-master)没有可用的许可信息。

RSS订阅生成库

dev-master 2014-10-13 13:14 UTC

This package is auto-updated.

Last update: 2024-09-27 01:44:02 UTC


README

Build Status

安装

如果使用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();

许可

MIT许可