ZenMagick 0.9.6


org.zenmagick.plugins.ZMPluginPageController

Class ZMPluginPageController

ZMObject
|
+--ZMPluginPageController

public class ZMPluginPageController
extends ZMObject

Plugin page controller base class.

Author:
DerManoMann
Version:
$Id: ZMPluginPageController.php 2149 2009-04-13 22:59:14Z dermanomann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMPluginPageController(string id, string title, string plugin, string ext)

Create a new instance.

Method Summary
string

getId()

Get the id.

protected string

getPageContents(array context, string viewDir)

Evaluate template and return contents.

protected ZMPlugin

getPlugin()

Get the plugin.

ZMPluginPage

process()

Process a HTTP request.

ZMPluginPage

processGet()

Process a HTTP GET request.

ZMPluginPage

processPost()

Process a HTTP POST request.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMPluginPageController

public ZMPluginPageController(string id, string title, string plugin, string ext)

Create a new instance.

Parameters:
id - The id.
title - The page title.
plugin - The parent plugin name.
ext - Optional template file extension; default is .php.

Method Detail

getId

public string getId()

Get the id.

Returns:
The page id.

getPageContents

protected string getPageContents(array context, string viewDir)

Evaluate template and return contents.

Parameters:
context - The page context.
viewDir - Optional view folder relative to the plugin dir; default is views.
Returns:
The page contents.

getPlugin

protected ZMPlugin getPlugin()

Get the plugin.

Returns:
The plugin.

process

public ZMPluginPage process()

Process a HTTP request.

Supported request methods are GET and POST.

Returns:
A ZMPluginPage instance or null.

processGet

public ZMPluginPage processGet()

Process a HTTP GET request.

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

processPost

public ZMPluginPage processPost()

Process a HTTP POST request.

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

ZenMagick 0.9.6