Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Latest commit

 

History

History
27 lines (18 loc) · 505 Bytes

README.md

File metadata and controls

27 lines (18 loc) · 505 Bytes

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;