Download the PHP package dereuromark/cakephp-feed without Composer
On this page you can find all versions of the php package dereuromark/cakephp-feed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dereuromark/cakephp-feed
More information about dereuromark/cakephp-feed
Files in dereuromark/cakephp-feed
Package cakephp-feed
Short Description A CakePHP plugin containing RssView and AtomView classes for generating RSS 2.0 and Atom 1.0 feeds.
License MIT
Homepage https://github.com/dereuromark/cakephp-feed
Informations about the package cakephp-feed
CakePHP Feed Plugin
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.rssand/feed.atomfrom the same controller action is a few extra lines.
Additional features
- Automatic View class mapping via
rssandatomextensions.
See my article for details on the history of this view class.
Demo
https://sandbox.dereuromark.de/sandbox/feed-examples
Installation & Docs
- Documentation
Possible TODOs
- Maybe add Feed readers instead of just writers.