Class ModuleItem

Description

The objective representation of a Module

This object provides access to the parameters of a module. Modules are usually stored in a ModuleList.

Error handling is done using ModuleException exceptions.

This whole entry may be cached, so that parsing the modinfo file and some computations don't need to be repeated for every request.

Located in /phpsatk-lib/core/15.module.item.php (line 46)


	
			
Method Summary
ModuleItem __construct (string $path)
mixed callHook (string $name, mixed 1)
array[ModuleClass] getClasses ()
string getID ()
DOMNode getMetaData ()
DOMDocument getModinfo ()
string getName ()
string getPath ()
unknown getVersion ()
ModuleClass getVirtualClass (string $virtual, string $version)
boolean isLoaded ()
void load ()
boolean provides (string $name, integer $version)
boolean providesClass (string $class)
Methods
Constructor __construct (line 168)

Initializes a module by its path

Reads the modinfo file, validates it and calls the modinfo parser.

  • access: public
  • see: parseModInfo()
ModuleItem __construct (string $path)
  • string $path: Path to module directory
callHook (line 473)

Calls a registered callback of the module

mixed callHook (string $name, mixed 1)
  • string $name: Callback identifier
  • mixed 1: ... Args for the callback function
getClasses (line 308)

Gets an array of classes contained in this module

  • access: public
array[ModuleClass] getClasses ()
getID (line 332)

Gets the ID of this module

  • access: public
  • see: $id
string getID ()
getMetaData (line 279)

Returns a subtree of meta-data for this module

  • access: public
DOMNode getMetaData ()
getModinfo (line 270)

Gets the DOM tree repesenting the modinfo file

  • access: public
DOMDocument getModinfo ()
getName (line 322)

Gets the name of this module

  • access: public
  • see: $name
string getName ()
getPath (line 350)

Gets the path to the module base

  • access: public
string getPath ()
getVersion (line 341)

Gets the version of this module

  • access: public
unknown getVersion ()
getVirtualClass (line 387)

Gets the class providing a virtual role

  • access: public
ModuleClass getVirtualClass (string $virtual, string $version)
  • string $virtual: Virtual role
  • string $version: Virtual version
isLoaded (line 426)

Checks whether a module has been already loaded

  • access: public
boolean isLoaded ()
load (line 408)

Loads this module

This includes the resolving of depencies and calling a possibly registered 'initialize' function.

void load ()
provides (line 371)

Checks whether this module contains a class that provides a specified virtual

  • access: public
boolean provides (string $name, integer $version)
  • string $name: Virtual module
  • integer $version: Virtual module version
providesClass (line 360)

Checks whether this module contains a specified class

  • access: public
boolean providesClass (string $class)
  • string $class: Name of the class you are looking for

Documentation generated on Mon, 21 May 2007 10:34:37 +0200 by phpDocumentor 1.3.0RC5