Feed Generator 

Extension key

feed_generator

Package name

brotkrueml/typo3-feed-generator

Version

0.8

Language

en

Author

Chris Müller

License

This document is published under the Creative Commons BY 4.0 license.

Rendered

Wed, 03 Dec 2025 19:26:49 +0000


Generator for Atom, JSON and RSS feeds in TYPO3


This chapter provides an introduction to how the Feed Generator extension works.

This section describes the system requirements and the installation of the extension.

A comprehensive summary of how to create feeds in various formats and describing some specialties.

An overview of all configured feeds.

The public API of the interfaces, classes and enums and how they interact.

Introduction 

What does it do? 

The extension provides classes to generate Atom, JSON and RSS feeds in an easy way. The target group are developers as the contents of the feeds must be provided programmatically according to the model.

A PSR-15 middleware is used to determine the URL and call the according feed implementation class. The feed URL, the format and the optional site(s) are configured in the implementation class which provides the data via attributes. Have a look into the Developer corner chapter for examples how this is done.

This extension supports

Release management 

This extension uses semantic versioning which basically means for you, that

  • Bugfix updates (e.g. 1.0.0 => 1.0.1) just includes small bug fixes or security relevant stuff without breaking changes.
  • Minor updates (e.g. 1.0.0 => 1.1.0) includes new features and smaller tasks without breaking changes.
  • Major updates (e.g. 1.0.0 => 2.0.0) breaking changes which can be refactorings, features or bug fixes.

The changes between the different versions can be found in the changelog.

Installation 

The recommended way to install this extension is by using Composer. In your Composer-based TYPO3 project root, just type:

composer req brotkrueml/typo3-feed-generator
Copied!

and the recent stable version will be installed.

In a classic installation, you can also install the extension from the TYPO3 Extension Repository (TER).

The extension configuration offers some basic configuration which is explained in the Configuration chapter.

Developer corner 

Introduction 

This extension provides classes and interfaces to implement feeds in different formats. You don't have to worry about the details of the feeds and how they are build, you only have to provide the data from your concrete model.

Example 

New in version 0.5.0

Instead of implementing the FeedInterface like described below one can also extend from the \Brotkrueml\FeedGenerator\Entity\AbstractFeed abstract class which returns empty values for each getter method. One can override the necessary methods. This way, only the methods required for a specific feed format must be overridden which results in smaller feed implementation classes.

Let's start with an example to warm up.

EXT:your_extension/Classes/Feed/YourFeed.php
<?php
declare(strict_types=1);

namespace YourVender\YourExtension\Feed;

use Brotkrueml\FeedGenerator\Attributes\Feed;
use Brotkrueml\FeedGenerator\Collection\Collection;
use Brotkrueml\FeedGenerator\Contract\FeedInterface;
use Brotkrueml\FeedGenerator\Contract\ImageInterface
use Brotkrueml\FeedGenerator\Entity\Author;
use Brotkrueml\FeedGenerator\Entity\Item;
use Brotkrueml\FeedGenerator\Format\FeedFormat;

#[Feed('/your-feed.atom', FeedFormat::ATOM)]
final class YourFeed implements FeedInterface
{
   public function getId(): string
   {
      return '';
   }

   public function getTitle(): string
   {
      return 'Your website title';
   }

   public function getDescription(): string
   {
      return 'Here comes the Atom feed for your website.';
   }

   public function getLink(): string
   {
      return 'https://example.com/';
   }

   public function getAuthors(): Collection
   {
      return (new Collection())
         ->add(new Author('Your Company'));
   }

   public function getDatePublished(): ?\DateTimeInterface
   {
      return null;
   }

   // If the method returns an implementation of the DateTimeInterface it is
   // also used for the "Last-Modified" header in the HTTP response.
   public function getDateModified(): ?\DateTimeInterface
   {
      return new \DateTimeImmutable();
   }

   public function getLastBuildDate(): ?\DateTimeInterface
   {
      return null;
   }

   public function getLanguage(): string
   {
      return 'en';
   }

   public function getCopyright(): string
   {
      return '';
   }

   public function getImage(): ?ImageInterface;
   {
      return new Image('https://example.com/fileadmin/your-logo.png');
   }

   public function getItems(): Collection
   {
      return (new Collection())->add(
         (new Item())
            ->setTitle('Another awesome article')
            ->setDateModified(new \DateTimeImmutable('2022-06-07T18:22:00+02:00'))
            ->setLink('https://example.com/another-awesome-article'),
         (new Item())
            ->setTitle('Some awesome article'),
            ->setDateModified(new \DateTimeImmutable('2022-02-20T20:06:00+01:00')),
            ->setLink('https://example.com/some-awesome-article'),
      );
   }
}
Copied!

First, a class which provides the data for one or more feeds must implement the Brotkrueml\FeedGenerator\Contract\FeedInterface interface. This marks the class as a feed data provider and requires some methods to be implemented. Of course, you can use dependency injection to inject service classes, for example, a repository that provides the needed items.

To define under which URL a feed is available and which format should be used you have to provide at least one \Brotkrueml\FeedGenerator\Attributes\Feed class attribute. As format a name of the \Brotkrueml\FeedGenerator\Attributes\Feed enum is used which defines the according format.

The getItems() method returns a \Brotkrueml\FeedGenerator\Collection\Collectionobject of Brotkrueml\FeedGenerator\Entity\Item entities (or to be precise of objects implementing the Brotkrueml\FeedGenerator\Contract\ItemInterface).

A list of all configured feeds is available in the Configuration module.

Interfaces 

Three interfaces for a feed implementation are available and of interest:

FeedInterface 

The Brotkrueml\FeedGenerator\Contract\FeedInterface marks the feed – well – as a feed and requires the implementation of some methods like in the example above.

FeedFormatAwareInterface 

When implementing the Brotkrueml\FeedGenerator\Contract\FeedFormatAwareInterface, you can access the feed format of the current request. This is helpful if you define a feed implementation with different formats and want to adjust some values according to the format.

EXT:your_extension/Classes/Feed/YourFeed.php
// use Brotkrueml\FeedGenerator\Contract\FeedFormatAwareInterface
// use Brotkrueml\FeedGenerator\Format\FeedFormat

#[Feed('/your-feed.atom', FeedFormat::ATOM)]
#[Feed('/your-feed.json', FeedFormat::JSON)]
#[Feed('/your-feed.rss', FeedFormat::RSS)]
final class YourFeed implements FeedInterface, FeedFormatAwareInterface
{
   private FeedFormat $format;

   public function setFormat(FeedFormat $format): void
   {
      $this->format = $format;
   }

   public function getDescription(): string
   {
       return match ($this->format) {
           FeedFormat::ATOM => 'Here comes the Atom feed for your website.',
           FeedFormat::JSON => 'Here comes the JSON feed for your website.',
           FeedFormat::RSS => 'Here comes the RSS feed for your website.'
       };
   }

   // ... the other methods from the introduction example are untouched
}
Copied!

RequestAwareInterface 

The Brotkrueml\FeedGenerator\Contract\RequestAwareInterface injects the PSR-7 request object via a setRequest() method, which must be implemented by yourself.

This way you have access to request attributes, such as normalised parameters, the site or the language information:

EXT:your_extension/Classes/Feed/YourFeed.php
// use Brotkrueml\FeedGenerator\Contract\RequestAwareInterface;
// use Psr\Http\Message\ServerRequestInterface;

#[Feed('/your-feed.atom', FeedFormat::ATOM)]
final class YourFeed implements FeedInterface, RequestAwareInterface
{
   private ServerRequestInterface $request;

   public function setRequest(ServerRequestInterface $request): void
   {
      $this->request = $request;
   }

   public function getLink(): string
   {
      return $this->request->getAttribute('normalizedParams')->getSiteUrl();
   }

   public function getItems(): array
   {
      $router = $this->request->getAttribute('site')->getRouter();

      return [
         (new Item())
            ->setTitle('Another awesome article')
            ->setDateModified(new \DateTimeImmutable('2022-06-07T18:22:00+02:00'))
            ->setLink((string)$router->generateUri(43)),
         (new Item())
            ->setTitle('Some awesome article')
            ->setDateModified(new \DateTimeImmutable('2022-02-20T20:06:00+01:00'))
            ->setLink((string)$router->generateUri(42)),
         ),
      ];
   }

   // ... the other methods from the introduction example are untouched
}
Copied!

Collection 

Where a list of "items" have to be returned a Brotkrueml\FeedGenerator\Collection\Collection object comes into the game:

  • List of authors of a feed or an item ( Collection<AuthorInterface>)
  • List of attachments of an item ( Collection<AttachmentInterface>)
  • List of categories of a feed ( Collection<CategoryInterface>)
  • List of items of a feed ( Collection<ItemInterface>)

A collection can be used like this:

// use Brotkrueml\\FeedGenerator\\Collection\\Collection
// use Brotkrueml\\FeedGenerator\\Contract\\AuthorInterface

/**
 * @var Collection<AuthorInterface> $authorCollection
 */
$authorCollection = new Collection();
$authorCollection->add($author1);
// Also multiple authors can be added at once
$authorCollection->add($author2, $author3);

// ... same for the other items ...
Copied!

Multiple feeds 

It is possible to define several feed formats for a class. In this case, it may be useful to implement the FeedFormatAwareInterface.

EXT:your_extension/Classes/Feed/YourFeed.php
#[Feed('/your-feed.atom', FeedFormat::ATOM)]
#[Feed('/your-feed.json', FeedFormat::JSON)]
#[Feed('/your-feed.rss', FeedFormat::RSS)]
final class YourFeed implements FeedInterface
{
   // ...
}
Copied!

But it is also possible to add different paths with the same format:

EXT:your_extension/Classes/Feed/YourFeed.php
#[Feed('/en/your-feed.atom', FeedFormat::ATOM)]
#[Feed('/de/dein-feed.atom', FeedFormat::ATOM)]
#[Feed('/nl/je-feed.atom', FeedFormat::ATOM)]
final class YourFeed implements FeedInterface
{
   // ...
}
Copied!

If the paths of a feed match the entry point configured in the site configuration, the PSR-7 request object attribute site is populated with the corresponding information (such as base path and language).

Multiple sites 

For a multi-site installation, it may be necessary to restrict a feed to one or more sites. Simply add the site identifier(s) as a third argument to the Feed class attribute:

EXT:your_extension/Classes/Feed/YourFeed.php
#[Feed('/your-feed.atom', FeedFormat::ATOM, ['website', 'blog'])]
final class YourFeed implements FeedInterface
{
   // ...
}
Copied!

Control of cache headers 

The cache headers for a feed request can be influenced with the class attribute \Brotkrueml\FeedGenerator\Attributes\Cache. One can pass the number in seconds that a feed should be cached by a browser or feed reader:

EXT:your_extension/Classes/Feed/YourFeed.php
// use Brotkrueml\FeedGenerator\Attributes\Cache

#[Feed('/your-feed.atom', FeedFormat::ATOM])]
#[Cache(3600)] // Cache for one hour
final class YourFeed implements FeedInterface
{
   // ...
}
Copied!

To clarify that the number stands for seconds, you can also use a named argument:

EXT:your_extension/Classes/Feed/YourFeed.php
// use Brotkrueml\FeedGenerator\Attributes\Cache

#[Feed('/your-feed.atom', FeedFormat::ATOM)]
#[Cache(seconds: 3600)] // Cache for one hour
final class YourFeed implements FeedInterface
{
   // ...
}
Copied!

Both examples will result in the following HTTP headers:

Cache-Control: max-age=3600
Expires: Mon, 20 Jun 2022 08:06:03 GMT
Copied!

If you want to define the cache headers for all available feeds, you can also set them directly in the configuration of your Apache web server according to the content type:

.htaccess
# Apache module "mod_expires" has to be active

# For Atom feeds
ExpiresByType application/atom+xml "access plus 1 hour"
# For JSON feeds
ExpiresByType application/feed+json "access plus 1 hour"
# For RSS feeds
ExpiresByType application/rss+xml "access plus 1 hour"
Copied!

XSL stylesheet 

A feed implementation may return the path to an XSL stylesheet in the getStyleSheet() method. This way, the appearance of an Atom or RSS feed can be customised in a browser.

EXT:your_extension/Classes/Feed/YourFeed.php
#[Feed('/your-feed.atom', FeedFormat::ATOM)]
final class YourFeed implements FeedInterface
{
   public function getStyleSheet(): string
   {
      return 'EXT:your_extension/Resources/Public/Xsl/Atom.xsl';
   }

   // ... the other methods from the introduction example are untouched
}
Copied!

An XSL stylesheet is only considered for XML feeds (Atom and RSS). When providing a stylesheet for a JSON feed, it is ignored.

This extension comes with two XSL stylesheets, one for an Atom feed and one for an RSS feed, which can be used directly or copied and adapted to your needs:

  • Atom: EXT:feed_generator/Resources/Public/Xsl/Atom.xsl
  • RSS: EXT:feed_generator/Resources/Public/Xsl/Rss.xsl

Translations 

When configuring a feed for different languages, it may be convenient to use translations from locallang.xlf files. One possible implementation could be:

EXT:your_extension/Classes/Feed/YourFeed.php
// use TYPO3\CMS\Core\Localization\LanguageService;
// use TYPO3\CMS\Core\Localization\LanguageServiceFactory;

#[Feed('/en/your-feed.atom', FeedFormat::ATOM)]
#[Feed('/de/dein-feed.atom', FeedFormat::ATOM)]
#[Feed('/nl/je-feed.atom', FeedFormat::ATOM)]
final class YourFeed implements FeedInterface, RequestAwareInterface
{
   private ?LanguageService $languageService = null;

   public function __construct(
      private readonly LanguageServiceFactory $languageServiceFactory,
   ) {
   }

   public function getDescription(): string
   {
      // feed.description is defined in your extension's locallang.xlf
      return $this->translate('feed.description');
   }

   public function getTitle(): string
   {
      // feed.title is defined in your extension's locallang.xlf
      return $this->translate('feed.title');
   }

   private function translate(string $key): string
   {
      if ($this->languageService === null) {
         $this->languageService = $this->languageServiceFactory->createFromSiteLanguage(
            $this->request->getAttribute('language')
               ?? $this->request->getAttribute('site')->getDefaultLanguage();
         );
      }

      return $this->languageService->sL(
         'LLL:EXT:your_extension/Resources/Private/Language/locallang.xlf:' . $key
      );
   }

   // ... the other methods from the introduction example are untouched
}
Copied!

Overview of properties in use by feed type 

\Brotkrueml\FeedGenerator\Contract\AuthorInterface 

See: Brotkrueml\FeedGenerator\Contract\AuthorInterface

Interface method Atom tag JSON property RSS tag
getEmail() <author><email>
getName() <author><name> author.name <author>
getUri() <author><uri> author.url <author>

\Brotkrueml\FeedGenerator\Contract\CategoryInterface 

See: Brotkrueml\FeedGenerator\Contract\CategoryInterface

Interface method Atom tag JSON property RSS tag
getLabel() <category label="...">
getScheme() <category scheme="..."> <category domain="...">
getTerm() <category term="..."> <category>

\Brotkrueml\FeedGenerator\Contract\FeedInterface 

See: Brotkrueml\FeedGenerator\Contract\FeedInterface

Interface method Atom tag JSON property RSS tag
getAuthors() <author> author <dc:creator>
getCopyright() <rights> <copyright>
getDatePublished() <pubDate>
getDateModified() <updated>
getDescription() <subtitle> description <description>
getId() <id>
getImage() <logo> <image>
getItems() <entry> items <item>
getLastBuildDate() <lastBuildDate>
getLanguage() <feed xml:lang="..."> <language>
getLink() <link rel="alternate"> home_page_url <link>
getTitle() <title> title <title>

\Brotkrueml\FeedGenerator\Contract\ImageInterface 

See: Brotkrueml\FeedGenerator\Contract\ImageInterface

Interface method Atom tag JSON property RSS tag
getDescription() <feed><image><description>
getHeight() <feed><image><height>
getLink() <feed><image><link>
getTitle() <feed><image><title>
getUri() <feed><logo> <feed><image><url>
getWidth() <feed><image><width>

\Brotkrueml\FeedGenerator\Contract\ItemInterface 

See: Brotkrueml\FeedGenerator\Contract\ItemInterface

Interface method Atom tag JSON property RSS tag
getAttachments() attachments <enclosure type="..." length="..." url="..."/> (only one)
getAuthors() <author> authors <dc:creator>
getCategories() <category term="..." scheme="..." label="..."/> tags <category>
getContent() <content> content_html <content:encoded>
getDatePublished() <published> date_published <pubDate>
getDateModified() <updated> date_modified
getDescription() <summary> summary <description>
getId() <id> id <guid isPermaLink="false">
getLink() <link rel="alternate" type="text/html" href="..."/> url <link>
getTitle() <title> title <title>

Configuration 

An overview of the available extensions and configured feeds can be found in the System > Configuration module.

List of available extensions 

In the upper menu bar of the Configuration module, select Feed Generator: Extensions.

Available extensions in the Configuration module

Available extensions in the Configuration module

You can quickly look up an extension using the search box.

List of configured feeds 

In the upper menu bar of the Configuration module, select Feed Generator: Feeds.

Configured feeds in the Configuration module

Configured feeds in the Configuration module

The feeds are grouped by the fully-qualified name of the class that implements a feed.

You can quickly look up a feed using the search box.

API 

This chapter provides information about all necessary interfaces, classes and enumerations. For up-to-date information, please read the source code.

This extension provides some implementations of interfaces as value objects. However, you can also create your own implementations as long as they implement the appropriate interfaces.

FeedFormatATOMJSONRSSAuthorInterfaceCategoryInterfaceFeedInterfaceFeedFormatAwareInterfaceImageInterfaceItemInterfaceRequestAwareInterfaceAuthorImageItemYourFeedThis is your feed implementation classCategoryused in attributesrequiredoptionaloptionalcontains10 .. ncontains10 .. ncontains10 .. ncontains10 .. 1contains10 .. n

Overview 

Brotkrueml\FeedGenerator\Format\FeedFormat 

class FeedFormat
Fully qualified name
\Brotkrueml\FeedGenerator\Format\FeedFormat
const ATOM

Brotkrueml\FeedGenerator\Format\FeedFormat::ATOM, type object

const JSON

Brotkrueml\FeedGenerator\Format\FeedFormat::JSON, type object

const RSS

Brotkrueml\FeedGenerator\Format\FeedFormat::RSS, type object

name

Brotkrueml\FeedGenerator\Format\TextFormat 

class TextFormat
Fully qualified name
\Brotkrueml\FeedGenerator\Format\TextFormat
const HTML

Brotkrueml\FeedGenerator\Format\TextFormat::HTML, type object

const TEXT

Brotkrueml\FeedGenerator\Format\TextFormat::TEXT, type object

name

Brotkrueml\FeedGenerator\Entity\AbstractFeed 

abstract class AbstractFeed
Fully qualified name
\Brotkrueml\FeedGenerator\Entity\AbstractFeed

This class is an implementation of the FeedInterface and returns for every getter an empty result. It is meant to be extended by custom implementations which then only have to override the methods that should return something meaningful.

getId ( )
returntype

string

getTitle ( )
returntype

string

getDescription ( )
returntype

string

returntype

string

getAuthors ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

getDatePublished ( )
returntype

DateTimeInterface

getDateModified ( )
returntype

DateTimeInterface

getLastBuildDate ( )
returntype

DateTimeInterface

getLanguage ( )
returntype

string

getCopyright ( )
returntype

string

getImage ( )
returntype

Brotkrueml\FeedGenerator\Contract\ImageInterface

getCategories ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

getItems ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

getStyleSheet ( )
returntype

string

getExtensionContents ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

Brotkrueml\FeedGenerator\ValueObject\Attachment 

class Attachment
Fully qualified name
\Brotkrueml\FeedGenerator\ValueObject\Attachment
__construct ( string url, string type = '', int length = 0)
param string $url

The URL

param string $type

The type

param int $length

The length

getUrl ( )
returntype

string

getType ( )
returntype

string

getLength ( )
returntype

int

Brotkrueml\FeedGenerator\ValueObject\Author 

class Author
Fully qualified name
\Brotkrueml\FeedGenerator\ValueObject\Author
__construct ( string name, string email = '', string uri = '')
param string $name

The name

param string $email

The email address

param string $uri

The URI to a profile page

getName ( )
returntype

string

getEmail ( )
returntype

string

getUri ( )
returntype

string

Brotkrueml\FeedGenerator\ValueObject\Category 

class Category
Fully qualified name
\Brotkrueml\FeedGenerator\ValueObject\Category
__construct ( string term, string scheme = '', string label = '')
param string $term

The term

param string $scheme

The scheme

param string $label

The label

getTerm ( )
returntype

string

getScheme ( )
returntype

string

getLabel ( )
returntype

string

Brotkrueml\FeedGenerator\Collection\Collection 

class Collection
Fully qualified name
\Brotkrueml\FeedGenerator\Collection\Collection
add ( Brotkrueml\\FeedGenerator\\Contract\\CollectableInterface items)
returntype

self

get ( int index)
param int $index

the index

returntype

Brotkrueml\FeedGenerator\Contract\CollectableInterface

isEmpty ( )
returntype

bool

getIterator ( )
returntype

Traversable

Brotkrueml\FeedGenerator\ValueObject\Image 

class Image
Fully qualified name
\Brotkrueml\FeedGenerator\ValueObject\Image
__construct ( string url, string title = '', string link = '', int width = 0, int height = 0, string description = '')
param string $url

The URL

param string $title

The title

param string $link

The link

param int $width

The width

param int $height

The height

param string $description

The description

getUrl ( )
returntype

string

getTitle ( )
returntype

string

returntype

string

getWidth ( )
returntype

int

getHeight ( )
returntype

int

getDescription ( )
returntype

string

Brotkrueml\FeedGenerator\Entity\Item 

class Item
Fully qualified name
\Brotkrueml\FeedGenerator\Entity\Item
getId ( )
returntype

string

setId ( string id)
param string $id

the id

returntype

self

getTitle ( )
returntype

string

setTitle ( string title)
param string $title

the title

returntype

self

getDescription ( )
returntype

Brotkrueml\FeedGenerator\Contract\TextInterface|string

setDescription ( Brotkrueml\\FeedGenerator\\Contract\\TextInterface|string description)
param Brotkrueml\\FeedGenerator\\Contract\\TextInterface|string $description

the description

returntype

self

getContent ( )
returntype

string

setContent ( string content)
param string $content

the content

returntype

self

returntype

string

param string $link

the link

returntype

self

getAuthors ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

addAuthors ( Brotkrueml\\FeedGenerator\\Contract\\AuthorInterface authors)
returntype

self

getDatePublished ( )
returntype

DateTimeInterface

setDatePublished ( DateTimeInterface datePublished)
param DateTimeInterface $datePublished

the datePublished

returntype

self

getDateModified ( )
returntype

DateTimeInterface

setDateModified ( DateTimeInterface dateModified)
param DateTimeInterface $dateModified

the dateModified

returntype

self

getAttachments ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

addAttachments ( Brotkrueml\\FeedGenerator\\Contract\\AttachmentInterface attachments)
returntype

self

getCategories ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

addCategories ( Brotkrueml\\FeedGenerator\\Contract\\CategoryInterface categories)
returntype

self

addExtensionContents ( Brotkrueml\\FeedGenerator\\Contract\\ExtensionContentInterface contents)
returntype

self

getExtensionContents ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

Brotkrueml\FeedGenerator\ValueObject\Text 

class Text
Fully qualified name
\Brotkrueml\FeedGenerator\ValueObject\Text
__construct ( string text, string $format = Brotkrueml\\FeedGenerator\\Format\\TextFormat::TEXT)
param string $text

The text

param Brotkrueml\\FeedGenerator\\Format\\TextFormat $format

The format

getText ( )
returntype

string

getFormat ( )
returntype

Brotkrueml\FeedGenerator\Format\TextFormat

Brotkrueml\FeedGenerator\Contract\AuthorInterface 

interface AuthorInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\AuthorInterface

Interface for an author.

getName ( )

Get the name.

returntype

string

getEmail ( )

Get the email address.

returntype

string

getUri ( )

Get the URI. Used in Atom only.

returntype

string

Brotkrueml\FeedGenerator\Contract\CategoryInterface 

interface CategoryInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\CategoryInterface

Interface for a category. Used in Atom and RSS feeds.

getTerm ( )

Get the term. The term identifies the category.

returntype

string

getScheme ( )

Get the scheme. The scheme identifies the categorisation scheme via a URI.

returntype

string

getLabel ( )

Get the label. The label provides a human-readable label for display. Used in Atom only.

returntype

string

Brotkrueml\FeedGenerator\Contract\AttachmentInterface 

interface AttachmentInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\AttachmentInterface

Interface for an attachment (enclosure). Used in RSS and JSON feeds.

getUrl ( )

Get the URL.

returntype

string

getType ( )

Get the type, for example "video/mp4". Return empty string to omit in output.

returntype

string

getLength ( )

Get the length in bytes. Return 0 to omit in output

returntype

int

Returns

max>

Brotkrueml\FeedGenerator\Contract\FeedFormatAwareInterface 

interface FeedFormatAwareInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\FeedFormatAwareInterface
setFormat ( Brotkrueml\\FeedGenerator\\Format\\FeedFormat format)
param Brotkrueml\\FeedGenerator\\Format\\FeedFormat $format

the format

Brotkrueml\FeedGenerator\Contract\FeedInterface 

interface FeedInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\FeedInterface

Interface for a feed.

getId ( )

Get a unique identifier associated with this feed. Used in Atom only.

returntype

string

getTitle ( )

Get the title of the feed.

returntype

string

getDescription ( )

Get the text description of the feed.

returntype

string

Get a URI to the HTML website containing the same or similar information as this feed (i.e. if the feed is from a blog, it should provide the blog's URI where the HTML version of the entries can be read).

returntype

string

getAuthors ( )

Get the data for authors.

returntype

Brotkrueml\FeedGenerator\Collection\Collection

getDatePublished ( )

Get the date on which this feed was published. Used in RSS only.

returntype

DateTimeInterface

getDateModified ( )

Get the date on which this feed was last modified. Used in Atom only.

returntype

DateTimeInterface

getLastBuildDate ( )

Get the date on which this feed was last build. Used in RSS only.

returntype

DateTimeInterface

getLanguage ( )

Get the language of the feed. Used in Atom and RSS.

returntype

string

getCopyright ( )

Get a copyright notice associated with the feed. Used in Atom and RSS.

returntype

string

getImage ( )

Get an image. Used in Atom and RSS.

returntype

Brotkrueml\FeedGenerator\Contract\ImageInterface

getCategories ( )
returntype

Brotkrueml\FeedGenerator\Collection\Collection

getItems ( )

Get the items of the feed.

returntype

Brotkrueml\FeedGenerator\Collection\Collection

getStyleSheet ( )

Get the path for an XSL stylesheet. Used in Atom and RSS.

The path should be prefixed with "EXT:".

returntype

string

getExtensionContents ( )

Get extension contents for the feed

returntype

Brotkrueml\FeedGenerator\Collection\Collection

Brotkrueml\FeedGenerator\Contract\ImageInterface 

interface ImageInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\ImageInterface

Interface for an image. Used in Atom and RSS.

getUrl ( )

Get the URL of the image. Required.

returntype

string

getTitle ( )

Get the title. Used and required for RSS.

returntype

string

Get the link. Used and required for RSS.

returntype

string

getWidth ( )

Get the width of the image. Use for RSS.

returntype

int

Returns

144>

getHeight ( )

Get the height of the image. Use for RSS.

returntype

int

Returns

400>

getDescription ( )

Get the description of the image. Use for RSS.

returntype

string

Brotkrueml\FeedGenerator\Contract\ItemInterface 

interface ItemInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\ItemInterface
getId ( )

Get a unique identifier associated with this item. These are optional so long as a link is added; i.e. if no identifier is provided, the link is used.

returntype

string

getTitle ( )

Get the title of the item.

returntype

string

getDescription ( )

Get the description of the item.

returntype

Brotkrueml\FeedGenerator\Contract\TextInterface|string

getContent ( )

Get the content of the item. In JSON this is the HTML content.

returntype

string

Get a URI to the HTML website containing the same or similar information as this item (i.e. if the feed is from a blog, it should provide the blog article's URI where the HTML version of the entry can be read).

returntype

string

getAuthors ( )

Get the data for authors. For an RSS feed only one author can be assigned.

returntype

Brotkrueml\FeedGenerator\Collection\Collection

getDatePublished ( )

Get the date on which this item was published. If null, the date used will be the current date and time.

returntype

DateTimeInterface

getDateModified ( )

Get the date on which this item was last modified. If null, the date used will be the current date and time.

Used in Atom and JSON.

returntype

DateTimeInterface

getAttachments ( )

Get the attachments (enclosure). In accordance with the RSS Best Practices Profile of the RSS Advisory Board, no support is offered for multiple enclosures since such support forms no part of the RSS specification.

JSON feeds support multiple attachments.

returntype

Brotkrueml\FeedGenerator\Collection\Collection

getCategories ( )

Get the categories for the item.

returntype

Brotkrueml\FeedGenerator\Collection\Collection

getExtensionContents ( )

Get extension contents for the item.

returntype

Brotkrueml\FeedGenerator\Collection\Collection

Brotkrueml\FeedGenerator\Contract\RequestAwareInterface 

interface RequestAwareInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\RequestAwareInterface
setRequest ( Psr\\Http\\Message\\ServerRequestInterface request)
param Psr\\Http\\Message\\ServerRequestInterface $request

the request

Brotkrueml\FeedGenerator\Contract\TextInterface 

interface TextInterface
Fully qualified name
\Brotkrueml\FeedGenerator\Contract\TextInterface
getText ( )
returntype

string

getFormat ( )
returntype

Brotkrueml\FeedGenerator\Format\TextFormat

Changelog 

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased 

0.8.0 - 2025-12-03 

Added 

  • Compatibility with TYPO3 v14

Removed 

  • Compatibility with TYPO3 v12

0.7.0 - 2024-03-19 

Added 

  • Compatibility with TYPO3 v13

Removed 

  • Compatibility with TYPO3 v11

0.6.0 - 2022-12-05 

Added 

  • Extension API for feeds
  • Categories for items
  • Link to feed itself in an RSS feed
  • Item content property in RSS feed

Changed 

  • Author in RSS feed now uses dc:creator tag

0.5.0 - 2022-11-18 

Added 

  • AbstractFeed class which can be extended in custom feed implementations

Changed 

  • Substitute laminas/laminas-feed and jdecool/jsonfeed with custom implementation
  • Rename Enclosure class to Attachment
  • Allow multiple attachments for JSON feeds
  • Integrate FeedCategoryInterface into FeedInterface
  • Integrate StyleSheetInterface into FeedInterface
  • Adjust namespace for classes Attachment, Author, Category, Image

0.4.0 - 2022-10-31 

Added 

  • Compatibility with TYPO3 v12
  • Status report for dependencies
  • Categories can be added to a feed

Changed 

  • debril/feed-io removed in favour of laminas/laminas-feed and jdecool/jsonfeed
  • Needed dependencies must be installed manually (laminas/laminas-feed, jdecool/jsonfeed)
  • Namespace of multiple classes has changed

Removed 

  • Media in items

0.3.0 - 2022-06-20 

Added 

  • Overview of feeds in Configurations module
  • Last-Modified header in middleware
  • Cache attribute for Feed class to control cache HTTP headers

Changed 

  • Position of middleware in frontend stack

Updated 

  • debril/feed-io to version 6

0.2.0 - 2022-06-10 

Added 

  • Media (like images, videos, audios) can be attached to a feed item
  • Author can be attached to a feed or to a feed item

0.1.0 - 2022-04-01 

First preview release

Sitemap