ZenMagick 0.9.6


org.zenmagick.rp.uip.controller.ZMRssController

Class ZMRssController

ZMObject
|
+--ZMController
|
+--ZMRssController

public class ZMRssController
extends ZMController

Request controller for RSS feeds.

The processGet() method is generic and will call an appropriate method for item generation based on the channel request parameter.

The item method is expected to return the last modified date of the channel.

Todo:
Support for custom/additional channel/item properties.
Author:
DerManoMann
Version:
$Id: ZMRssController.php 1966 2009-02-14 10:52:50Z dermanomann $

Constructor Summary

ZMRssController()

Create new instance.

Method Summary
ZMRssFeed

getChapterFeed(string key)

Generate RSS feed for EZPages chapter.

ZMRssFeed

getProductsFeed(string key)

Generate RSS feed for products.

ZMRssFeed

getReviewsFeed(string key)

Generate RSS feed for reviews.

ZMView

processGet()

Process a HTTP GET request.

void

rssFooter()

Write RSS footer.

void

rssHeader(mixed channel, ZMRssChannel The)

Write RSS header.

void

rssItem(ZMRssItem item)

Generate RSS item.

Methods inherited from org.zenmagick.rp.ZMController
exportGlobal, findView, getFormBean, getGlobal, getGlobals, getId, getView, handleRequest, isFormSubmit, process, processGet, processPost, setContentType, setId, setView, validate, validateFormBean
Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMRssController

public ZMRssController()

Create new instance. /


Method Detail

getChapterFeed

public ZMRssFeed getChapterFeed(string key)

Generate RSS feed for EZPages chapter.

Parameters:
key - EZPages chapter.
Returns:
The feed data.

getProductsFeed

public ZMRssFeed getProductsFeed(string key)

Generate RSS feed for products.

Parameters:
key - Optional key value for various product types; supported: 'new'
Returns:
The feed data.

getReviewsFeed

public ZMRssFeed getReviewsFeed(string key)

Generate RSS feed for reviews.

Parameters:
key - Optional product id.
Returns:
The feed data.

processGet

public ZMView processGet()

Process a HTTP GET request.

This implementation will grab the channel parameter from the request. All further processing is based on that value.

Ideally, the only method that needs to be implemented (if not already there), is one that generates the feed contents. The method name is generated as: get[ucwords($channel)]Feed. So, for example, if channel is reviews, the method to be expected would be getReviewsFeed($key).

/

Returns:
A ZMView that handles presentation or null * if the controller generates the contents itself.

rssFooter

public void rssFooter()

Write RSS footer. /


rssHeader

public void rssHeader(mixed channel, ZMRssChannel The)

Write RSS header.

Required data are:


rssItem

public void rssItem(ZMRssItem item)

Generate RSS item.

Required data are:


ZenMagick 0.9.6