2017 © Pedro Peláez
 

library event

Simple event dispatcher

image

lemonphp/event

Simple event dispatcher

  • Wednesday, August 10, 2016
  • by oanhnn
  • Repository
  • 3 Watchers
  • 4 Stars
  • 2,926 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 23 % Grown

The README.md

Package lemonphp/event

Build Status Coverage Status, (*1)

A simple event dispatcher, (*2)

Usage

use Lemon\Event\Event;
use Lemon\Event\EventDispatcher;

$dispatcher = new EventDispatcher();

// Add listener (listener is callable with event object as argument)
$dispatcher->addListener('event.type', function(Event $event) {
    echo $event->getEventType() . ' is fired';
});

// Add subscriber (subscriber is implemented by yourself)
$dispatcher->addSubscriber($subscriber);

$dispatcher->dispatch('event.type');

Changelog

See all change logs in CHANGELOG.md, (*3)

Contributing

All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code., (*4)

Fork the project, create a feature branch, and send a pull request., (*5)

To ensure a consistent code base, you should make sure the code follows the PSR-2., (*6)

If you would like to help take a look at the list of issues., (*7)

License

This project is released under the MIT License.
Copyright © 2015-2016 LemonPHP Team., (*8)

The Versions

10/08 2016

dev-master

9999999-dev https://github.com/lemonphp/event

Simple event dispatcher

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

event event-dispatcher

10/08 2016

v1.0.0

1.0.0.0 https://github.com/lemonphp/event

Simple event dispatcher

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

event event-dispatcher

29/01 2016

v0.3.0

0.3.0.0 https://github.com/lemonphp/event

Simple event dispatcher

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

event event-dispatcher

22/01 2016

v0.2.0

0.2.0.0 https://github.com/lemonphp/event

Simple event dispatcher

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

event event-dispatcher