Module API

Summary
Looks up a module in the global module cache
Register a dynamic module with phpwebtools’ module caching functions.
Look up the name of a file associated with a module class
Execute an arbitrary method in a module

Functions

check_module

function check_module ($module_name,  
$version =  NULL)

Looks up a module in the global module cache

Parameters

$module_nameName of the module in question
$version(optional) Only return true if the module has a higher version number than this value.  Defaults to disabled.

Returns

Boolean, whether module is found or not.

register_module

function register_module ($module_name)

Register a dynamic module with phpwebtools’ module caching functions.

Parameters

$module_nameName of the class that is the module.  All module variables, including MODULE_FILE, must be set in order for this to properly register a module.

resolve_module

function resolve_module ($module_name)

Look up the name of a file associated with a module class

Parameters

$module_nameName of the module class to be resolved.  This is case insensitive.

Returns

File name of the module.

module_function

function module_function ($module_name,  
$function,  
$params =  "")

Execute an arbitrary method in a module

Parameters

$module_nameName of the module class in question
$functionName of the method to be executed
$params(optional) Array of parameters to be passed to the specified method.  Defaults to none.

Returns

Mixed output, returning the results of the method call.

function check_module ($module_name,  
$version =  NULL)
Looks up a module in the global module cache
function register_module ($module_name)
Register a dynamic module with phpwebtools’ module caching functions.
function resolve_module ($module_name)
Look up the name of a file associated with a module class
function module_function ($module_name,  
$function,  
$params =  "")
Execute an arbitrary method in a module