Bonfire includes an events library which can be used to configure event handling for your application (and to handle events triggered by Bonfire, as well).
See System Events for additional documentation.
Trigger an event.
$event_name: the name of the event to trigger.
$payload: (optional) A reference to the data to send to the event method.
Note: Since the
$payload is passed by reference, the original data may be modified by the event handler.
When this method is called, any subscribers registered for
/application/config/events.php will be called.
This method is called by the constructor to allow the library to be initialized when loaded by CodeIgniter.
This is not intended to be called directly (despite being a public method).