Handles adding and dispatching events

package Requests
subpackage Utilities

 Methods

Constructor

__construct() 

Dispatch a message

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

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
inherited_from \Requests_Hooker::register()

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

 Properties

 

Registered callbacks for each hook

$hooks : array

Default

array()