Skip to content

About

Symple Event Manager class in php.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symple Event Manager


BASIC USAGE

$firstFunc = function() {
    echo "called first\n";
};

$secondFunc = function() {
    echo "called second\n";
};

$thirdFunc = function() {
    echo "called third\n";
};

$em = new EventManager();
$em->addEventListener("type_one", $firstFunc);
$em->addEventListener("type_two", $secondFunc);
$em->addEventListener("type_two", $thirdFunc);


$em->fireEvent("type_one");
$em->fireEvent("type_two");


// expected output:
// called first
// called second
// called third

About

Symple Event Manager class in php.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages