Allows you to create hook points throughout the application that any other module can tap into without hacking core code.
| Events Class | Allows you to create hook points throughout the application that any other module can tap into without hacking core code. |
| Variables | |
| $events | Holds the registered events. |
| Functions | |
| __construct() | This if here solely for CI loading to work. |
| init() | Loads the config/events.php file into memory so we can access it later without the disk load. |
| trigger() | Triggers an individual event. |
public static function trigger( $event_name = null, & $payload = null )
Triggers an individual event.
NOTE: The payload sent to the event method is a pointer to the actual data. This means that any operations on the data will affect the original data. Use with care.
$event_name = A string with the name of the event to trigger. Case sensitive. $payload = (optional) A variable pointer to send to the event method.
void
Holds the registered events.
private static $events
This if here solely for CI loading to work.
public function __construct()
Loads the config/events.php file into memory so we can access it later without the disk load.
public static function init()
Triggers an individual event.
public static function trigger( $event_name = null, & $payload = null )