PHPackages                             neunerlei/event-bus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. neunerlei/event-bus

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

neunerlei/event-bus
===================

This package contains a PSR-14 compliant event dispatcher facade, which aims to bring the listener provider and dispatcher objects closer together.

3.0.0(5y ago)02.0k1Apache-2.0PHPPHP ^7.3CI failing

Since Mar 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Neunerlei/event-bus-php)[ Packagist](https://packagist.org/packages/neunerlei/event-bus)[ RSS](/packages/neunerlei-event-bus/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (6)Versions (7)Used By (1)

Event Bus
=========

[](#event-bus)

[![Create new Release](https://github.com/Neunerlei/event-bus-php/workflows/Create%20new%20Release/badge.svg?event=push)](https://github.com/Neunerlei/event-bus-php/workflows/Create%20new%20Release/badge.svg?event=push)[![codecov](https://camo.githubusercontent.com/4ce22b9b2b809be652145388631adc05fdf8ae755897b040c64713338062b439/68747470733a2f2f636f6465636f762e696f2f67682f4e65756e65726c65692f6576656e742d6275732d7068702f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Neunerlei/event-bus-php)[![GitHub issues](https://camo.githubusercontent.com/e5cf3da0355160ecfb2a3f5bc983fb4d0bb58fe74d60d71a0d330b87f721291d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4e65756e65726c65692f6576656e742d6275732d706870)](https://github.com/Neunerlei/event-bus-php/issues)[![GitHub license](https://camo.githubusercontent.com/5d8d2fe01304d63bc7449cff8ae6ef89c0b662704a40613b2a18e87d7c3179ac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4e65756e65726c65692f6576656e742d6275732d706870)](https://github.com/Neunerlei/event-bus-php/blob/master/LICENSE.md)

This package contains a [PSR-14](https://www.php-fig.org/psr/psr-14/) compliant event dispatcher facade, which aims to bring the listener provider and dispatcher objects closer together.

While I see where PSR is coming from, for the most part in my daily life it feels weired to have the registration of listeners and dispatching of events in two different classes. This is were this facade comes in; it combines both the dispatcher and provider into a single class you can use in your code.

Version 2.0
-----------

[](#version-20)

The second version does no longer rely on the [Tukio library](https://github.com/Crell/Tukio), instead provides it's own listener provider and dispatcher implementations. The dependency on my [Options library](https://github.com/Neunerlei/options-php) has also been removed in order to improve performance in event-heavy projects.

Installation
------------

[](#installation)

Install this package using composer:

```
composer require neunerlei/event-bus

```

Basic usage
-----------

[](#basic-usage)

You can use the event bus like any other good'ol event bus implementation you have without psr 14.

```
