Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

 
Found 1 of 138 records in table Wiki
Now Showing 1 of 1

Current Record: getFeed

getFeed

[Permalink]

getFeed() Delegate Class Method

Synopsis:

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:

  1. title - The title of the RSS feed as it should appear in the subscribers' feed list.
  2. description - Describes the RSS feed.
  3. link - A link to the RSS feed
  4. syndicationURL - The URL to this RSS feed's site.

Parameters

  1. 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:

blog comments powered by Disqus
Powered by Xataface
(c) 2005-2018 All rights reserved