Home > fire_event

fire_event

Fire_event is a project mainly written in PHP, it's free.

PHP Event Dispatcher Class

Simple Event Handler class in PHP, great for add plugins to your application.

Example

Event::add('initialize','init');
Event::add('finish','show_hello');

// simple
function init() {
  echo 'Starting...';
}

// callback with reference args
function show_hello(&$body) {
  $body = 'Hello World '.$body;
}

//...
//...

Event::fire('initialize');
$body = 'Danillo';
Event::fire('finish',&body);
echo $body;
Previous:seacon