PHP Class Horde_Core_Hooks, horde

Since: 2.11.0
Author: Michael Slusarz ([email protected])
Datei anzeigen Open project: horde/horde

Protected Properties

Property Type Description
$_apps array Cached hook objects (keys are application names).

Public Methods

Method Description
callHook ( string $hook, string $app = 'horde', array $args = [] ) : mixed Call a Horde hook.
hookExists ( string $hook, string $app = 'horde' ) : boolean Returns whether a hook exists.

Method Details

callHook() public method

WARNING: Throwing exceptions is expensive, so use callHook() with care and cache the results if you going to use the results more than once.
public callHook ( string $hook, string $app = 'horde', array $args = [] ) : mixed
$hook string The hook function to call.
$app string The hook application.
$args array An array of any arguments to pass to the hook function.
return mixed The results of the hook.

hookExists() public method

Use this if you have to call a hook many times and expect the hook to not exist.
public hookExists ( string $hook, string $app = 'horde' ) : boolean
$hook string The hook function.
$app string The hook application.
return boolean True if the hook exists.

Property Details

$_apps protected_oe property

Cached hook objects (keys are application names).
protected array $_apps
return array