Événement is a very simple event dispatching library for PHP. It has the same design goals as Silex and Pimple, to empower the user while staying concise and simple.
Concise indeed. At the core it’s a tad above 50 lines of codes.
Listening for events:
$emitter->on('user.created', function (User $user) use ($logger) {
$logger->log(sprintf("User '%s' was created.", $user->getLogin()));
});
Dispatching events:
$emitter->emit('user.created', array($user));