2017 © Pedro Peláez
 

library event-bus

Event dispatcher library

image

innmind/event-bus

Event dispatcher library

  • Sunday, February 25, 2018
  • by Baptouuuu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,486 Installations
  • PHP
  • 9 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 8 % Grown

The README.md

EventBus

Build Status codecov Type Coverage, (*1)

Simple library to dispatch events to listeners; with the particularity that you can't order your listeners, listeners can't modify the event, listeners can't stop other listeners to be called and the event must be an object., (*2)

Instalation

composer require innmind/event-bus

Example

use function Innmind\EventBus\bootstrap;
use Innmind\Immutable\Map;

class MyEvent{}

$echo = function(MyEvent $event): void {
    echo 'foo';
};

$dispatch = bootstrap()['bus'](
    Map::of('string', 'callable')
        (MyEvent::class, $echo)
);

$dispatch(new MyEvent); // will print "foo"

All listeners must be callables and can listen to a specific class, a parent class or an interface., (*3)

The Versions

25/02 2018

dev-master

9999999-dev http://github.com/Innmind/EventBus

Event dispatcher library

  Sources   Download

MIT

The Requires

 

The Development Requires

dispatcher event

25/02 2018

2.1.0

2.1.0.0 http://github.com/Innmind/EventBus

Event dispatcher library

  Sources   Download

MIT

The Requires

 

The Development Requires

dispatcher event

25/02 2018

dev-develop

dev-develop http://github.com/Innmind/EventBus

Event dispatcher library

  Sources   Download

MIT

The Requires

 

The Development Requires

dispatcher event

12/02 2017

2.0.0

2.0.0.0 http://github.com/Innmind/EventBus

Event dispatcher library

  Sources   Download

MIT

The Requires

 

The Development Requires

dispatcher event

27/01 2017

1.1.0

1.1.0.0 http://github.com/Innmind/EventBus

Event dispatcher library

  Sources   Download

MIT

The Requires

 

dispatcher event

21/01 2017

1.0.2

1.0.2.0 http://github.com/Innmind/EventBus

Event dispatcher library

  Sources   Download

MIT

The Requires

 

dispatcher event

30/11 2016

1.0.1

1.0.1.0 http://github.com/Innmind/EventBus

Event dispatcher library

  Sources   Download

MIT

The Requires

 

dispatcher event

18/06 2016

1.0.0

1.0.0.0 http://github.com/Innmind/EventBus

Event dispatcher library

  Sources   Download

MIT

The Requires

 

dispatcher event