Class FlatFileActionSource

Description

The FlatFileActionSource class allows one to execute Harmoni actions (see ActionHandler) which are contained within

flat files. Modules exist as folders on the file system, and actions exist as PHP source files within those folders. They may be organized like so: <p> basepath/user/login.act.php basepath/user/logout.act.php basepath/main/welcome.act.php <p> In this example, the base path would be "basepath/", and the actions file extension would be ".act.php".

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

Located in /harmoni/core/actionHandler/actionSources/FlatFileActionSource.class.php (line 23)

ActionSource
   |
   --FlatFileActionSource
Variable Summary
string $_basePath
Method Summary
void FlatFileActionSource (string $basePath, [string $fileExtension = ".php"])
boolean actionExists (string $module, string $action)
ref executeAction (string $module, string $action, ref $harmoni)
string _mkFullPath (mixed $module, mixed $action)
Variables
string $_basePath (line 29)
  • var: The base path on the filesystem to look for module folders.
  • access: private
string $_fileExtension (line 35)
  • var: The extension to add onto action names to locate their associated files.
  • access: private
Methods
Constructor FlatFileActionSource (line 45)

Constructor

  • access: public
void FlatFileActionSource (string $basePath, [string $fileExtension = ".php"])
  • 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.act.php" with a file extension of ".act.php".
actionExists (line 58)

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 83)

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 69)

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:23:17 -0400 by phpDocumentor 1.3.0RC3