spaze/feed-exports 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spaze/feed-exports

最新稳定版本:v2.0.0

Composer 安装命令:

composer require spaze/feed-exports

包简介

Atom feed Response and related objects for Nette framework

README 文档

README

Atom feed Response and related objects for Nette framework

Nette Framework usage

use Spaze\Exports\Atom\Constructs\AtomPerson;
use Spaze\Exports\Atom\Constructs\AtomText;
use Spaze\Exports\Atom\Constructs\AtomTextType;
use Spaze\Exports\Atom\Elements\AtomEntry;
use Spaze\Exports\Atom\AtomFeed;
use Spaze\Exports\Bridges\Nette\AtomResponse;

// [ ... ]

    public function actionArticles(?string $param = null): void
    {
        $now = new \DateTimeImmutable('2020-10-20 10:20:20 Europe/Prague');

        $feed = new AtomFeed('https://url', 'Feed Title');
        $feed->setLinkSelf('https://url');
        $feed->setUpdated($now);
        $feed->setAuthor(new AtomPerson('foo bar'));

        $entry = new AtomEntry(
            'https://href/1',
            new AtomText('<em>title-1</em>', AtomTextType::Html),
            new \DateTimeImmutable('2019-12-20 12:20:20 Europe/Prague'),
            new \DateTimeImmutable('2019-12-16 12:20:20 Europe/Prague')
        );
        $entry->setContent(new AtomText('some <strong>content-1</strong>'));
        $feed->addEntry($entry);

        $entry = new AtomEntry(
            'https://href/2',
            new AtomText('title-2', AtomTextType::Text),
            new \DateTimeImmutable('2018-12-20 12:20:20 Europe/Prague'),
            new \DateTimeImmutable('2018-12-16 12:20:20 Europe/Prague')
        );
        $entry->setContent(new AtomText('other <strong>content-2</strong>'));
        $feed->addEntry($entry);

        $this->sendResponse(new AtomResponse($feed));
    }

// [ ... ]

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固