File/program/lib/modulelib.php

Description

/program/lib/modulelib.php - module factory

  • author: Peter Fokker <peter@berestijn.nl>
  • version: $Id: modulelib.php,v 1.2 2011-02-03 14:04:04 pfokker Exp $
  • copyright: Copyright (C) 2008-2011 Ingenieursbureau PSD/Peter Fokker
  • todo: we probably need to get rid of this file because it is not used (2010-12-07/PF)
  • license: GNU AGPLv3+Additional Terms
Includes
 require_once ($CFG->progdir."/lib/module.class.php") (line 30)

module class is used as a base class from which others are derived

Functions
module_factory (line 46)

manufacture a module object

This loads (includes) a specific module based on the parameter $module_id. Relevant data is read from the database. If no module can be found, the function returns FALSE;

Note that the base Module-class is always included so it is there if other modules need it.

  • return: FALSE on error, or an instance of the specified module class
  • todo: what if the module is not found? Currently no alternative is loaded but FALSE is returned.
  • uses: $CFG
bool|object module_factory ([int $module_id = 0], [ $node_id = NULL])
  • int $module_id: which module to retrieve from database via primary key
  • $node_id

Documentation generated on Wed, 11 May 2011 23:45:27 +0200 by phpDocumentor 1.4.0