Class ClassesActionSource

Description

The ClassesActionSource looks for actions as classes located within include files.

The classes each have a special method as defined by ACTIONS_CLASSES_METHOD which is called in order to execute the action.

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

Located in /harmoni/core/actionHandler/actionSources/ClassesActionSource.class.php (line 17)

ActionSource
   |
   --ClassesActionSource
Variable Summary
Method Summary
void ClassesActionSource (string $basePath, string $fileExtension, [optional $classNameSuffix = ''])
boolean actionExists (string $module, string $action)
ref executeAction (string $module, string $action, ref $harmoni)
string _mkFullPath (mixed $module, mixed $action)
Variables
string $_basePath (line 26)
  • var: The base path on the filesystem to look for module folders.
  • access: private
string $_classNameSuffix (line 39)
  • var: Suffix to append to the name of classes
  • access: private
string $_fileExtension (line 33)
  • var: The extension to add onto action names to locate their associated files.
  • access: private
Methods
Constructor ClassesActionSource (line 56)

Constructor

  • access: public
void ClassesActionSource (string $basePath, string $fileExtension, [optional $classNameSuffix = ''])
  • string $basePath: The base path on the filesystem which contains the module folders.
  • string $fileExtension: The extension to add onto action names to find the files, such that the action "welcome" might look for a file named "welcome.class.php" with a file extension of ".class.php".
  • optional $classNameSuffix: string $classNameSuffix A string to append to the names of action classes to prevent namespace conflicts with libraries/other classes. For example, with a suffix of 'Action', an action 'welcome' would correspond to a class named 'welcomeAction'.
actionExists (line 69)

Checks to see if a given modules/action pair exists for execution within this source.

  • access: public
boolean actionExists (string $module, string $action)
  • string $module
  • string $action

Redefinition of:
ActionSource::actionExists()
Checks to see if a given modules/action pair exists for execution within this source.
executeAction (line 93)

Executes the specified action in the specified module, using the Harmoni object as a base.

  • return: mixed A Layout or TRUE/FALSE
  • access: public
ref executeAction (string $module, string $action, ref $harmoni)
  • string $module: The module in which to execute.
  • string $action: The specific action to execute.
  • ref $harmoni: object $harmoni A reference to a Harmoni object.

Redefinition of:
ActionSource::executeAction()
Executes the specified action in the specified module, using the Harmoni object as a base.
_mkFullPath (line 80)

Makes a full pathname to an action file.

  • access: private
string _mkFullPath (mixed $module, mixed $action)

Inherited Methods

Inherited From ActionSource

ActionSource::actionExists()
ActionSource::executeAction()

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