Class Harmoni

Description

The Harmoni class combines the functionality of login, authentication, action-handling and theme-output. It makes use of the the ActionHandler classes.

The Harmoni class implements the Singleton pattern. There is only ever on instance of the Harmoni object and it is accessed only via the Harmoni::instance() method.

  • version: $Id: Harmoni.class.php,v 1.53 2007/09/04 20:25:30 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/architecture/harmoni/Harmoni.class.php (line 33)


	
			
Variable Summary
Method Summary
void Harmoni ()
void addPostExecActions (mixed $actions, string $action,...)
void addPreExecActions (mixed $actions, string $action,...)
ref attachData (string $key, mixed $value, mixed $value )
void attachOutputHandler (object $outputHandler)
void execute ()
void forward (string $module, mixed $action, string $action )
ref getAttachedData (mixed $key, string $key )
string getCurrentAction ()
ref getData (mixed $key, string $key )
object getOutputHandler ()
integer getVersionNumber ([optional $versionStr = null])
string getVersionStr ([optional $versionStr = null])
void setCurrentAction (string $action)
void setPostProcessAction (string $action, [optional $ignore = null])
void startSession ()
array _getVersionParts (string $string)
bool _isActionInArray (string $action, array $array)
Variables
object $ActionHandler (line 79)
object $config (line 97)
  • access: public
object RequestContext $request (line 85)
  • access: public
mixed $result (line 106)
mixed $_attachedData (line 99)
string $_currentAction (line 67)
  • var: A dotted-pair module.action
  • access: private
object OutputHandler $_outputHandler (line 73)
  • var: The handler we are using for output.
  • access: private
mixed $_postExecActions (line 102)
mixed $_postProcessAction (line 103)
mixed $_postProcessIgnoreList (line 104)
mixed $_preExecActions (line 101)
Methods
Constructor Harmoni (line 117)

The constructor.

  • access: public
void Harmoni ()
addPostExecActions (line 187)

Adds an action, or multiple, (see the ActionHandler) to execute after executing the action requested by the end user.

  • access: public
void addPostExecActions (mixed $actions, string $action,...)
  • string $action,...: A number of actions (module.action) to execute.
addPreExecActions (line 172)

Adds an action, or multiple, (see the ActionHandler) to execute before executing the action requested by the end user.

  • access: public
void addPreExecActions (mixed $actions, string $action,...)
  • string $action,...: A number of actions (module.action) to execute.
attachData (line 292)
  • return: mixed
ref attachData (string $key, mixed $value, mixed $value )
  • string $key
  • mixed $value : Attaches some arbitrary data to the Harmoni object so that actions or later functions can make use of it.
attachOutputHandler (line 423)

Set the OutputHandler to use for theming the output.

  • since: 4/5/05
  • access: public
void attachOutputHandler (object $outputHandler)
  • object $outputHandler
execute (line 365)

Executes the Harmoni procedures: action processing and themed output to the browser. Certain options must be set before execute() can be called.

  • access: public
void execute ()
forward (line 323)
void forward (string $module, mixed $action, string $action )
getAttachedData (line 313)
  • return: mixed
ref getAttachedData (mixed $key, string $key )
  • string $key : Returns the data attached by Harmoni::attachData referenced by $key.
getCurrentAction (line 443)

Returns the current action.

  • return: A dotted-pair action.
  • access: public
string getCurrentAction ()
getData (line 304)

Same as Harmoni::getAttachedData.

  • return: mixed
  • deprecated: 12/27/03 See getAttachedData()
ref getData (mixed $key, string $key )
  • string $key : Returns the data attached by Harmoni::attachData referenced by $key.
getOutputHandler (line 434)

Get the OutputHandler used for theming the output.

  • since: 4/5/05
  • access: public
object getOutputHandler ()
getVersionNumber (line 258)

Returns the numeric representation of our framework version. The format is XXMMRR, two digits for each of the major, minor and release numbers. NOTE: leading 0's are omitted.

  • access: public
integer getVersionNumber ([optional $versionStr = null])
  • optional $versionStr: string $versionStr An optional harmoni version string "M[.m[.r]]" to turn into a number. Otherwise, the actual running Harmoni version number will be used.
getVersionStr (line 244)

Returns a pretty version string of our running Harmoni framework version.

  • access: public
string getVersionStr ([optional $versionStr = null])
  • optional $versionStr: string $versionStr An optional harmoni version string. If it is a partial string, we will return a full three-part version string.
instance (line 50)

Get the instance of Harmoni.

The Harmoni class implements the Singleton pattern. There is only ever one instance of the Harmoni object and it is accessed only via the Harmoni::instance() method.

  • static:
  • since: 5/26/05
  • access: public
object Harmoni instance ()
setCurrentAction (line 453)

Sets the current Harmoni action.

  • access: public
void setCurrentAction (string $action)
  • string $action: A dotted-pair action string.
setPostProcessAction (line 203)

Sets the action to call after the browser-requested action has executed but before the output from that action is processed. The result from the previous action can be accessed as Harmoni::result.

  • access: public
void setPostProcessAction (string $action, [optional $ignore = null])
  • string $action: A dotted-pair action (module.action) to use for post processing.
  • optional $ignore: array $ignore An array of dotted-pair actions for which we will NOT execute the post-process action.
startSession (line 463)

Starts the session.

  • access: public
void startSession ()
_detectCurrentAction (line 327)
void _detectCurrentAction ()
_getVersionParts (line 275)

Returns an array of the Harmoni version string containing the major, minor and release numbers, in that order.

  • access: public
array _getVersionParts (string $string)
  • string $string
_isActionInArray (line 221)

Returns TRUE if $action is contained somewhere within the array of actions: $array.

  • access: private
bool _isActionInArray (string $action, array $array)
  • string $action
  • array $array

Documentation generated on Wed, 19 Sep 2007 10:23:34 -0400 by phpDocumentor 1.3.0RC3