Procedural File: hooks.php
Source Location: /lib/hooks.php
Page Details:
Functions related to hooks management.
Tags:
Includes:
add_hook [line 111]
void add_hook(
hook_name $hook_name, priority $priority, hook_function $hook_function, rollback_function $rollback_function)
|
|
Adds a procedure to a hook for later execution.
Parameters
| hook_name |
$hook_name |
Name of the hook. |
| priority |
$priority |
Numeric priority. Lowest means procedure will be executed before. |
| hook_function |
$hook_function |
Name of the php function called upon hook trigger. |
| rollback_function |
$rollback_function |
Name of the php rollback function called upon failure. |
clear_hooks [line 162]
void clear_hooks(
hook_name $hook_name)
|
|
Removes all procedures from a hook.
Parameters
| hook_name |
$hook_name |
Name of hook to clear. |
remove_hook [line 140]
void remove_hook(
hook_name $hook_name, priority $priority, hook_function $hook_function, rollback_function $rollback_function)
|
|
Removes a procedure from a hook, based on a filter.
Parameters
| hook_name |
$hook_name |
Name of the hook. |
| priority |
$priority |
Numeric priority. If set, all procedures of that priority will be removed. |
| hook_function |
$hook_function |
Name of the procedure function. If set, all procedures that call this function will be removed. |
| rollback_function |
$rollback_function |
Name of the php rollback function called upon failure. If set, all procedures that call this function as a rollback will be removed. |
run_hook [line 52]
true run_hook(
hook_name $hook_name, args $args)
|
|
Runs procedures attached to a hook.
Tags:
Parameters
| hook_name |
$hook_name |
Name of hook to run. |
| args |
$args |
Array of optional arguments set by phpldapadmin. It is normally in a form known by call_user_func_array() : [ 'server_id' => 0,
'dn' => 'uid=epoussa,ou=tech,o=corp,o=fr' ] |
sort_array_by_priority [line 36]
-1 sort_array_by_priority(
a $a, b $b)
|
|
Compares two arrays by numerically comparing their 'prority' value. Standard `cmp-like' function.
Tags:
Parameters
| a |
$a |
First element to compare. |
| b |
$b |
Second element to compare. |
|
|