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

danillos/fire_event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

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;

About

PHP Event Dispatcher Class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages