Documentation

HookManager

Event dispatcher

Table of Contents

Methods

dispatch()  : bool
Dispatch a message
register()  : mixed
Register a callback for a hook

Methods

dispatch()

Dispatch a message

public dispatch(string $hook[, array<string|int, mixed> $parameters = [] ]) : bool
Parameters
$hook : string

Hook name

$parameters : array<string|int, mixed> = []

Parameters to pass to callbacks

Return values
bool

Successfulness

register()

Register a callback for a hook

public register(string $hook, callable $callback[, int $priority = 0 ]) : mixed
Parameters
$hook : string

Hook name

$callback : callable

Function/method to call on event

$priority : int = 0

Priority number. <0 is executed earlier, >0 is executed later


        
On this page

Search results