Hook class.
More...
|
static | register ($hook, $file, $function, $version=1, $priority=0) |
|
static | register_array ($file, $arr) |
|
static | unregister ($hook, $file, $function, $version=1, $priority=0) |
|
static | unregister_by_file ($file) |
| Unregister all hooks with this file component. More...
|
|
static | insert ($hook, $fn, $version=0, $priority=0) |
| Inserts a hook into a page request. More...
|
|
static Zotlabs\Extend\Hook::insert |
( |
|
$hook, |
|
|
|
$fn, |
|
|
|
$version = 0 , |
|
|
|
$priority = 0 |
|
) |
| |
|
static |
Inserts a hook into a page request.
Insert a short-lived hook into the running page request. Hooks are normally persistent so that they can be called across asynchronous processes such as delivery and poll processes.
insert_hook lets you attach a hook callback immediately which will not persist beyond the life of this page request or the current process.
- Parameters
-
string | $hook | name of hook to attach callback |
string | $fn | function name of callback handler |
int | $version | hook interface version, 0 uses two callback params, 1 uses one callback param |
int | $priority | currently not implemented in this function, would require the hook array to be resorted |
static Zotlabs\Extend\Hook::register |
( |
|
$hook, |
|
|
|
$file, |
|
|
|
$function, |
|
|
|
$version = 1 , |
|
|
|
$priority = 0 |
|
) |
| |
|
static |
static Zotlabs\Extend\Hook::register_array |
( |
|
$file, |
|
|
|
$arr |
|
) |
| |
|
static |
static Zotlabs\Extend\Hook::unregister |
( |
|
$hook, |
|
|
|
$file, |
|
|
|
$function, |
|
|
|
$version = 1 , |
|
|
|
$priority = 0 |
|
) |
| |
|
static |
static Zotlabs\Extend\Hook::unregister_by_file |
( |
|
$file | ) |
|
|
static |
Unregister all hooks with this file component.
Useful for addon upgrades where you want to clean out old interfaces.
- Parameters
-
The documentation for this class was generated from the following file: