\Horde_Core_Hooks

Runs Horde application hooks.

Summary

Methods
Properties
Constants
callHook()
hookExists()
No public properties found
No constants found
No protected methods found
$_apps
N/A
No private methods found
No private properties found
N/A

Properties

$_apps

$_apps : array

Cached hook objects (keys are application names).

Type

array

Methods

callHook()

callHook(string  $hook, string  $app = 'horde', array  $args = array()) : mixed

Call a Horde hook.

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 hook function to call.

string $app

The hook application.

array $args

An array of any arguments to pass to the hook function.

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.

hookExists()

hookExists(string  $hook, string  $app = 'horde') : boolean

Returns whether a hook exists.

Use this if you have to call a hook many times and expect the hook to not exist.

Parameters

string $hook

The hook function.

string $app

The hook application.

Returns

boolean —

True if the hook exists.