Horde_Core_Hooks
in package
Runs Horde application hooks.
Tags
Table of Contents
Properties
- $_apps : array<string|int, mixed>
- Cached hook objects (keys are application names).
Methods
- callHook() : mixed
- Call a Horde hook.
- hookExists() : bool
- Returns whether a hook exists.
Properties
$_apps
Cached hook objects (keys are application names).
protected
array<string|int, mixed>
$_apps
= array()
Methods
callHook()
Call a Horde hook.
public
callHook(string $hook[, string $app = 'horde' ][, array<string|int, mixed> $args = array() ]) : mixed
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
- $hook : string
-
The hook function to call.
- $app : string = 'horde'
-
The hook application.
- $args : array<string|int, mixed> = array()
-
An array of any arguments to pass to the hook function.
Tags
Return values
mixed —The results of the hook.
hookExists()
Returns whether a hook exists.
public
hookExists(string $hook[, string $app = 'horde' ]) : bool
Use this if you have to call a hook many times and expect the hook to not exist.
Parameters
- $hook : string
-
The hook function.
- $app : string = 'horde'
-
The hook application.
Return values
bool —True if the hook exists.