Class miDispatcher

Description

Handles and dispatches the actions

  • copyright: Copyright (c) 2007 Mirchev Ideas Ltd. All rights reserved.

Located in /control/Dispatcher.php (line 15)


	
			
Direct descendents
Class Description
miDefaultDispatcher The default dispatcher class
Variable Summary
Method Summary
miDispatcher __construct (miView $view)
miAction|false createActionObj (string $action)
string getAction ()
boolean process ()
void setActionHandler (string $action, string $actionHandlerClass)
Variables
string $_action (line 28)

String parameter from the request specifing which action to be processed

  • access: protected
array $_actionHandlers = array() (line 42)

Array map between action and action processing class names

  • access: protected

Redefined in descendants as:
object $_actionObj = null (line 35)

The action object

  • access: protected
miView $_view (line 21)

Reference to the view object

  • access: protected
Methods
Constructor __construct (line 49)

Initializes the dispatcher

  • access: public
miDispatcher __construct (miView $view)
clearActionHandlers (line 69)

Clears all action handlers

  • access: public
void clearActionHandlers ()
createActionObj (line 124)

Creates new action object, subclassed from miAction. The object depends on $action If the action is unknown returns false

  • access: protected
miAction|false createActionObj (string $action)
  • string $action
getAction (line 79)

Returns the action string

  • return: the action string
  • access: public
string getAction ()
getActionObj (line 90)

Returns the action object The action object is initialized in process()

  • return: the action object
  • access: public
miAction getActionObj ()
process (line 101)

Determines which action will be performed depending on the value of the "action" parameter from the request.

  • return: true if the action was recognized
  • access: public
boolean process ()
setActionHandler (line 61)

Adds a class that handles a specific action The action processing class must inherit from miAction

  • access: public
void setActionHandler (string $action, string $actionHandlerClass)
  • string $action: the action name
  • string $actionHandlerClass: the name of the action processing class

Documentation generated on Thu, 08 May 2008 16:57:25 +0300 by phpDocumentor 1.4.1