XCube_Controller Class Reference

Inherited by Legacy_Controller.

Inheritance diagram for XCube_Controller:

[legend]
List of all members.

Public Member Functions

 prepare (&$root)
 executeCommon ()
 executeHeader ()
 execute ()
 executeView ()
 executeForward ($url, $time=0, $message=null)
 executeRedirect ($url, $time=1, $message=null)
 addActionFilter (&$filter)
 _setupFilterChain ()
 _setupEnvironment ()
 _setupDB ()
getDB ()
 _setupLanguage ()
 _setupConfig ()
 _setupSession ()
 _setupUser ()
 _processFilter ()
 _setupBlock ()
 _processBlock ()
 _processPreBlockFilter ()
 _processPostFilter ()
 _processPreload ($path)
_createDelegateManager ()
_createServiceManager ()
_createPermissionManager ()
_createRoleManager ()
_createContext ()

Detailed Description

Virtual or Actual front controller class.

This is an abstract class. And, a sub-class of this class has many impositions which sets up root object finally and implements many actual logic.

executeXXXXX() functions are a public member function called by an accessed file. These member functions call other protected member functions.

_setupXXXXX() functions are a protected member function overridden by a sub-class controller. Most of these functions are empty. A sub-class controller overrides them to set up a controller object and others.

_createXXXXX() functions are a protected member function overridden by a sub-class controller. These member functions are called in prepare() to set up the root object. And, they have been exported from prepare() for a sub-class controller to override easily. Most of sub-class controllers doesn't need to override them, because typical code is there.


Member Function Documentation

XCube_Controller::prepare ( &$  root  ) 

This member function is overridden. The sub-class implements the initialization process which sets up the root object finally.

Parameters:
XCube_Root $root

Reimplemented in Legacy_Controller.

XCube_Controller::executeCommon (  ) 

This member function is actual initialize process of web application. Some Nuke-like bases call this function at any timing.

public

Reimplemented in Legacy_Controller.

XCube_Controller::executeHeader (  ) 

Usually this member function is called after executeCommon(). But, some cases don't call this. Therefore, the page controller type base should not write the indispensable code here. For example, this is good to call blocks.

Reimplemented in Legacy_Controller.

XCube_Controller::execute (  ) 

Executes the main logic.

public

XCube_Controller::executeView (  ) 

Executes the view logic. This member function is overridden.

public

Reimplemented in Legacy_Controller.

XCube_Controller::executeForward ( url,
time = 0,
message = null 
)

TODO We may change this name to forward()

Parameters:
string $url Can't use html tags.
int $time
string $message

XCube_Controller::executeRedirect ( url,
time = 1,
message = null 
)

Redirect to the specified URL with displaying message.

Parameters:
string $url Can't use html tags.
int $time
string $message

Reimplemented in Legacy_Controller.

XCube_Controller::addActionFilter ( &$  filter  ) 

Adds the ActionFilter instance.

Parameters:
$filter XCube_ActionFilter

XCube_Controller::_setupFilterChain (  ) 

Create filter chain. protected

Reimplemented in Legacy_Controller.

XCube_Controller::_setupEnvironment (  ) 

This member function is overridden. Sets up the controller and the environment.

Reimplemented in Legacy_Controller.

XCube_Controller::_setupDB (  ) 

Creates the instance of DataBase class, and sets it to member property.

protected

Reimplemented in Legacy_Controller.

& XCube_Controller::getDB (  ) 

Gets the DB instance.

public

XCube_Controller::_setupLanguage (  ) 

Creates the instance of Language Manager class, and sets it to member property.

protected

Reimplemented in Legacy_Controller.

XCube_Controller::_setupConfig (  ) 

This member function is overridden. Loads site configuration informations, and sets them to the member property.

Reimplemented in Legacy_Controller.

XCube_Controller::_setupSession (  ) 

This member function is overrided. Sets up handler for session, then starts session.

Returns:
void

Reimplemented in Legacy_Controller.

XCube_Controller::_setupUser (  ) 

Sets up a principal object to the root object. In other words, restores the principal object from session or other.

Reimplemented in Legacy_Controller.

XCube_Controller::_processFilter (  ) 

Calls the preFilter() member function of action filters which have been loaded to the list of the controller.

protected

XCube_Controller::_setupBlock (  ) 

FIXME.

Reimplemented in Legacy_Controller.

XCube_Controller::_processBlock (  ) 

FIXME.

Reimplemented in Legacy_Controller.

XCube_Controller::_processPreBlockFilter (  ) 

Calls the preBlockFilter() member function of action filters which have been loaded to the list of the controller.

protected

Reimplemented in Legacy_Controller.

XCube_Controller::_processPostFilter (  ) 

Calls the postFilter() member function of action filters which have been loaded to the list of the controller.

protected

XCube_Controller::_processPreload ( path  ) 

This is utility member function for the sub-class controller. Load files with the rule from $path, and add the instance of the sub-class to the chain.

protected

Parameters:
$path string Absolute path.

& XCube_Controller::_createDelegateManager (  ) 

Creates an instance of the delegate manager and returns it.

Returns:
XCube_DelegateManager

Reimplemented in Legacy_Controller.

& XCube_Controller::_createServiceManager (  ) 

Creates an instance of the service manager and returns it.

Returns:
XCube_ServiceManager

Reimplemented in Legacy_Controller.

& XCube_Controller::_createPermissionManager (  ) 

Creates an instance of the permission manager and returns it.

Returns:
XCube_PermissionManager

& XCube_Controller::_createRoleManager (  ) 

Creates an instance of the role manager and returns it.

Returns:
XCube_RoleManager

& XCube_Controller::_createContext (  ) 

Creates the context object to initial the root object, and returns it.

Returns:
XCube_HttpContext

Reimplemented in Legacy_Controller.


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 00:27:22 2006 for XOOPS Cube Legacy by  doxygen 1.5.1