Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitModuleManager

Core::Module::arbitModuleManager

Class arbitModuleManager

Module manager, which needs to take care of proper module registration.

Module manager, which needs to take care of proper module registration.

Author(s):
Version:   $Revision: 1236 $
License:   GPL

Member Variables

protected static array $availableModules
Array with names of all available modules.

Array with names of all available modules.

protected static arbitModuleDefinitionLocator $locator
Module definition class locator

Module definition class locator

protected static array $modules
Array with module definitions

Array with module definitions

Method Summary

public static void activateModule( $moduleName )
Activates a module Activates a module in core, just given by its name.
protected static void findModuleClass( $moduleName )
Find the module definition class in the filesystem.
public static arbitModuleDefinition get( $moduleName )
Get module definition Return the module definition structure for the requested module.
public static array getAutoloads( )
Get all autoload definitions Returns the autoload definition array for all registerd modules. array is merged from all modules and contains the definition in commonly used structure.
public static array getPermissions( )
Get all permissions Get a list of all permissions as a multidimensional array, where the module name is the first dimension, wihich contains an array, in which the name of the permission is associated with its description, like:
public static array getSignals( )
Get all signals Get a list of all signals as a multidimensional array, where the module name is the first dimension, wihich contains an array, in which the name of the signal is associated with its description, like:
public static array getTemplatePaths( )
Get template paths Get a plain array of all module template paths.
public static void registerModule( $moduleName )
Registers an available module.
public static void setLocator( $locator )
Set a custom module class locator.

Methods

activateModule

static void activateModule( name $moduleName )

Activates a module Activates a module in core, just given by its name.

Activates a module Activates a module in core, just given by its name.

Parameters:
Name Type Description
$moduleName name
Exceptions:
Type Description
arbitUnknownModuleException When an unregistered module is requested.

findModuleClass

static void findModuleClass( string $moduleName )

Find the module definition class in the filesystem.

Find the module definition class in the filesystem. The module definition struct must be located under modules/<name>/definition.php. This method checks if such a file is available and includes the definition struct.

Parameters:
Name Type Description
$moduleName string

get

static arbitModuleDefinition get( string $moduleName )

Get module definition Return the module definition structure for the requested module.

Get module definition Return the module definition structure for the requested module.

Parameters:
Name Type Description
$moduleName string

getAutoloads

static array getAutoloads( )

Get all autoload definitions Returns the autoload definition array for all registerd modules. array is merged from all modules and contains the definition in commonly used structure.

Get all autoload definitions Returns the autoload definition array for all registerd modules. The array is merged from all modules and contains the definition in commonly used structure.

getPermissions

static array getPermissions( )

Get all permissions Get a list of all permissions as a multidimensional array, where the module name is the first dimension, wihich contains an array, in which the name of the permission is associated with its description, like:

Get all permissions Get a list of all permissions as a multidimensional array, where the module name is the first dimension, wihich contains an array, in which the name of the permission is associated with its description, like:

  1.   array(
  2.       'module' => array(
  3.           'perm' => 'Permission description',
  4.           ...
  5.       ),
  6.       ...
  7.   )

getSignals

static array getSignals( )

Get all signals Get a list of all signals as a multidimensional array, where the module name is the first dimension, wihich contains an array, in which the name of the signal is associated with its description, like:

Get all signals Get a list of all signals as a multidimensional array, where the module name is the first dimension, wihich contains an array, in which the name of the signal is associated with its description, like:

  1.   array(
  2.       'module' => array(
  3.           'signal' => 'Signal description',
  4.           ...
  5.       ),
  6.       ...
  7.   )

getTemplatePaths

static array getTemplatePaths( )

Get template paths Get a plain array of all module template paths.

Get template paths Get a plain array of all module template paths.

registerModule

static void registerModule( string $moduleName )

Registers an available module.

Registers an available module. Registers a module identifier that is available for the arbit installation.

Parameters:
Name Type Description
$moduleName string

setLocator

static void setLocator( arbitModuleDefinitionLocator $locator )

Set a custom module class locator.

Set a custom module class locator. This is mainly intented for testing, your module classes really should just obey the defined naming scheme.

Parameters:
Name Type Description
$locator arbitModuleDefinitionLocator
Documentation generated on Mon, 05 Apr 2010 14:02:03 +0200 by phpDocumentor 1.4.3