ZMObject
└─ZMController
└─ZMRssController
public class ZMRssController
extends ZMController
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| ZMRssFeed | getChapterFeed(ZMRequest request, string key) Generate RSS feed for EZPages chapter. |
| ZMRssFeed | getProductsFeed(ZMRequest request, string key) Generate RSS feed for products. |
| ZMRssFeed | getReviewsFeed(ZMRequest request, string key) Generate RSS feed for reviews. |
| ZMView | processGet(ZMRequest request) Process a HTTP GET request. |
| void | Write RSS footer. |
| void | rssHeader(ZMRequest request, ZMRssChannel channel) Write RSS header. |
| void | rssItem(ZMRequest request, ZMRssItem item) Generate RSS item. |
| Methods inherited from org.zenmagick.mvc.controller.ZMController | |
|---|---|
| findView, getFormData, getId, getView, isFormSubmit, preProcess, process, processGet, processPost, setContentType, setId, setView, validate, validateFormData, validateSession | |
| Methods inherited from org.zenmagick.core.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public ZMRssController()
Create new instance.
public ZMRssFeed getChapterFeed(ZMRequest request, string key)
Generate RSS feed for EZPages chapter.
public ZMRssFeed getProductsFeed(ZMRequest request, string key)
Generate RSS feed for products.
public ZMRssFeed getReviewsFeed(ZMRequest request, string key)
Generate RSS feed for reviews.
public ZMView processGet(ZMRequest request)
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($request, $key).
ZMView that handles presentation or null if the controller generates the contents itself.public void rssFooter()
Write RSS footer.
public void rssHeader(ZMRequest request, ZMRssChannel channel)
Write RSS header.
Required data are:
public void rssItem(ZMRequest request, ZMRssItem item)
Generate RSS item.
Required data are:
Request controller for RSS feeds.
The
processGet($request)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.