Event dispatcher

package Requests
subpackage Utilities

 Methods

Dispatch a message

dispatch(string $hook, array $parameters = array()) : boolean

Parameters

$hook

string

Hook name

$parameters

array

Parameters to pass to callbacks

Returns

booleanSuccessfulness

Register a callback for a hook

register(string $hook, callback $callback, integer $priority = 0

Parameters

$hook

string

Hook name

$callback

callback

Function/method to call on event

$priority

integer

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