dereuromark/cakephp-feed 问题修复 & 功能扩展

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

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

dereuromark/cakephp-feed

Composer 安装命令:

composer require dereuromark/cakephp-feed

包简介

A CakePHP plugin containing RssView and AtomView classes for generating RSS 2.0 and Atom 1.0 feeds.

README 文档

README

CI Coverage Status PHPStan Minimum PHP Version License Latest Stable Version Total Downloads Coding Standards

A CakePHP plugin containing RssView and AtomView classes for generating RSS 2.0 and Atom 1.0 feeds.

Version notice

This branch is for use with CakePHP 5.1+. See version map for details.

What is this plugin for?

There used to be a core helper for RSS generation, but it had several deficiencies. It also was removed in 4.0. So this plugin aims to provide a better support for feed generation — both RSS 2.0 (the de-facto standard, still required for podcasting) and Atom 1.0 (the cleaner, stricter successor preferred for most modern feeds).

Goals of these view classes

  • Support view-less actions via serialize.
  • Get rid of the ridiculously verbose "inline" namespace declarations.
  • Simplify the use of namespaces and their prefixes (auto-add only those that are actually used).
  • Support CDATA (unescaped content).
  • Allow mini-templating where necessary.
  • Accept friendly shorthands for the common case (bare strings for link, author, category) while leaving the full attribute shape available for power use.

RSS vs Atom: which one?

  • RSS 2.0 if you publish a podcast. Apple Podcasts and the rest of that ecosystem require RSS plus the itunes: namespace. Also pick RSS if you have a specific reason to target the long tail of RSS-only readers.
  • Atom 1.0 for almost anything else. Unambiguous date semantics (separate <published> and <updated>), typed content (text/html/xhtml), structured <author> with <name>/<email>/<uri>, multiple <link rel> per entry, mandatory <id> for proper deduplication. Most modern feed readers parse both equally well, and Atom is strictly less ambiguous.
  • Both, if you're not sure. Each view class is small; emitting /feed.rss and /feed.atom from the same controller action is a few extra lines.

Additional features

  • Automatic View class mapping via rss and atom extensions.

See my article for details on the history of this view class.

Demo

https://sandbox.dereuromark.de/sandbox/feed-examples

Installation & Docs

Possible TODOs

  • Maybe add Feed readers instead of just writers.

统计信息

  • 总下载量: 56.49k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固