Class Resque_Event
Inheritance | Resque_Event |
---|
Resque event/plugin system class
Public Methods
Method | Description | Defined By |
---|---|---|
clearListeners() | Call all registered listeners. | Resque_Event |
listen() | Listen in on a given event to have a specified callback fired. | Resque_Event |
stopListening() | Stop a given callback from listening on a specific event. | Resque_Event |
trigger() | Raise a given event with the supplied data. | Resque_Event |
Method Details
Call all registered listeners.
public static void clearListeners ( ) |
Listen in on a given event to have a specified callback fired.
public static true listen ( $event, $callback ) | ||
$event | string | Name of event to listen on. |
$callback | mixed | Any callback callable by call_user_func_array. |
Stop a given callback from listening on a specific event.
public static true stopListening ( $event, $callback ) | ||
$event | string | Name of event. |
$callback | mixed | The callback as defined when listen() was called. |
Raise a given event with the supplied data.
public static true trigger ( $event, $data = null ) | ||
$event | string | Name of event to be raised. |
$data | mixed | Optional, any data that should be passed to each callback. |