callHook()
callHook(string $hook, array $args = array(), string $app = 'horde') : mixed
Call a Horde hook, handling all of the necessary lookups and parsing
of the hook code.
WARNING: Throwing exceptions is expensive, so use callHook() with care
and cache the results if you going to use the results more than once.
Parameters
string |
$hook |
The function to call. |
array |
$args |
An array of any arguments to pass to the hook
function. |
string |
$app |
The hook application. |
Throws
- \Horde_Exception
Thrown on error from hook code.
- \Horde_Exception_HookNotSet
Thrown if hook is not active.
Returns
mixed
— The results of the hook.