joomla/joomla-framework — pull request #324 by florianv (2013-12-23 04:44:43+00:00)
Title: [Event] Improved the package

I improved the `Dispatcher` so instead of registering only objects or closures, it now supports any PHP callable.
It removes the need of the filter thing @eddieajau added, because now you register a callable per event.
Also it makes it easier for people to understand what the `addListener` method actually does.

It introduces this backward compatibility issue :

The function in the `Dispatcher` :

```php
public function addListener($listener, array $events = array())
```

becomes :

```php
public function addListener($listener, $eventName, $priority = Priority::NORMAL)
```