Go to the source code of this file.
Functions | |
if(!isset($hooks)) if(!isset($modules)) if(!isset($services)) | get_hooks () |
get_modules () | |
get_service ($service) | |
invoke_hook ($hook, $args=array(), $first_module= '', $last_module= '') | |
invoke_hook_first ($hook, $first_module, $args=array()) | |
invoke_hook_last ($hook, $last_module, $args=array()) | |
invoke_hook_while ($hook, $while, $args=array()) | |
load_modules ($search= '', $optional=false) | |
register_service ($service, $func, $args=array()) | |
register_hook ($hook, $info= '') | |
response ($data, $error=false) | |
run_service ($service, $args=array()) |
if (!isset($hooks)) if (!isset($modules)) if (!isset($services)) get_hooks | ( | ) |
get an array of all currently registered hooks
Definition at line 31 of file modules.inc.php.
get_modules | ( | ) |
get an array of all currently loaded modules
Definition at line 43 of file modules.inc.php.
get_service | ( | $ | service | ) |
return a service-array
call load_modules() before calling this function.
string | $service service name |
Definition at line 59 of file modules.inc.php.
invoke_hook | ( | $ | hook, | |
$ | args = array() , |
|||
$ | first_module = '' , |
|||
$ | last_module = '' | |||
) |
invoke a hook
this function also takes care of loading all modules.
string | $hook hook to invoke | |
array | $args arguments-array (can include references) | |
string | $first_module first module to call (optional) | |
string | $last_module last module to call (optional) |
Definition at line 80 of file modules.inc.php.
invoke_hook_first | ( | $ | hook, | |
$ | first_module, | |||
$ | args = array() | |||
) |
invoke a hook with a specified module being called first
this function also takes care of loading all modules.
string | $hook hook to invoke | |
string | $first_module name of first module to call | |
array | $args arguments-array (can include references) |
Definition at line 133 of file modules.inc.php.
invoke_hook_last | ( | $ | hook, | |
$ | last_module, | |||
$ | args = array() | |||
) |
invoke a hook with a specified module being called last
this function also takes care of loading all modules.
string | $hook hook to invoke | |
string | $last_module name of last module to call | |
array | $args arguments-array (can include references) |
Definition at line 148 of file modules.inc.php.
invoke_hook_while | ( | $ | hook, | |
$ | while, | |||
$ | args = array() | |||
) |
invoke a hook while the returned result is $while
this function also takes care of loading all modules.
string | $hook hook to invoke | |
mixed | $while value to compare the returned result with | |
array | $args arguments-array |
Definition at line 163 of file modules.inc.php.
load_modules | ( | $ | search = '' , |
|
$ | optional = false | |||
) |
load modules
use this function instead of including module_* files directly.
string | $search module to load (by default all modules are loaded) | |
bool | $optional whether to log any error to locate the module |
Definition at line 198 of file modules.inc.php.
register_hook | ( | $ | hook, | |
$ | info = '' | |||
) |
register a hook
this function is for information purposes only. you can also use a hook without registering it here. this is not recommended though.
string | $hook hook name | |
string | $info some words on the hook's purpose |
Definition at line 276 of file modules.inc.php.
register_service | ( | $ | service, | |
$ | func, | |||
$ | args = array() | |||
) |
register a service
you can specify the service's arguments in $args['args']. see run_services().
string | $service service name | |
string | $func function name | |
array | $args optional arguments |
Definition at line 259 of file modules.inc.php.
response | ( | $ | data, | |
$ | error = false | |||
) |
return a response-array
mixed | $data (payload) data (should be the error-message if $error is true) | |
mixed | $error error core or true if an error occurred |
Definition at line 293 of file modules.inc.php.
run_service | ( | $ | service, | |
$ | args = array() | |||
) |
run a service
this function checks the arguments in $args against the (optional) declaration given in register_service().
string | $service service name | |
array | $args arguments-array |
Definition at line 319 of file modules.inc.php.