The getFeed() method of a table delegate class or application delegate class returns an associative array of parameters to configure the RSS feed for a particular table . An RSS feed consists of the following components:
title - The title of the RSS feed as it should appear in the subscribers' feed list.
description - Describes the RSS feed.
link - A link to the RSS feed
syndicationURL - The URL to this RSS feed's site.
Parameters
array $query - The HTTP query. Contains information like the current table, current action, and search parameters. This allows you to customize your RSS feed depending on the user's query parameters.
Return Value
The getFeed() method returns an associative array with the components of the RSS feed. This array does not need to contain all possible keys, or even any keys. Any keys that are omitted will simply use default values in the RSS feed. The array may contain the following keys:
Name
Description
Version
title
The title for the RSS feed. If this omitted, it will try to use the title directive of the [_feed] section of the conf.ini file. Failing that, it will try to generate an appropriate title for the feed depending on the current query.
1.0
description
A Description for this RSS feed. If this is omitted, it will try to use the description directive of the [_feed] section of the conf.ini file.
1.0
link
A link to the source page of the RSS feed. If this is omitted, it will try to use the link directive of the [_feed] section of the conf.ini file.
1.0
syndicationURL
A link to the source page of the RSS feed. If this is omitted, it will try to use the syndicationURL directive of the [_feed] section of the conf.ini file.
1.0
Example
function getFeed(&$query){
return array(
'title' => "RSS feed for the ".$query['-table']." table.",
'description' => "News and updates for automobiles",
'link' => df_absolute_url(DATAFACE_SITE_HREF),
'syndicationURL' => df_absolute_url(DATAFACE_SITE_HREF)
);
}
Note that RSS feeds will work perfectly well without defining this method. This just allows you to customize one or more parameters of the RSS feed.
See Also:
getFeedItem - A delegate class method available to both the table delegate classes to configure parameters for the particular items of the RSS feed.
getRSSDescription? - A delegate class method to override the description that appears for a particular record in an RSS feed. (The same as the description parameter of the getFeedItem method.