PHPackages                             open-engine/event-dispatcher - 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. open-engine/event-dispatcher

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

open-engine/event-dispatcher
============================

Event Dispatcher

0.1.0(7y ago)011GPL-3.0-or-laterPHPPHP ~7.2

Since Jan 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/open-engine/event-dispatcher)[ Packagist](https://packagist.org/packages/open-engine/event-dispatcher)[ RSS](/packages/open-engine-event-dispatcher/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/4d25a2bff5b90277cf1a48c2a4eb8b262575def5e16a9c50900b0bfbf0fac3c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f70656e2d656e67696e652f6576656e742d646973706174636865722e737667)](https://packagist.org/packages/open-engine/event-dispatcher)[![Code Quality](https://camo.githubusercontent.com/a887c59d903e66dd44b1d62f637d76f24383a0f7ad8979876d9202e30d1e2719/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f70656e2d656e67696e652f6576656e742d646973706174636865722e737667)](https://scrutinizer-ci.com/g/open-engine/event-dispatcher)[![Code intelligence](https://camo.githubusercontent.com/5730d3c51ef157ba6db7b34b7b375f7c163d6614947c93ebae1f337b0def12af/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f70656e2d656e67696e652f6576656e742d646973706174636865722f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/g/open-engine/event-dispatcher)[![License](https://camo.githubusercontent.com/84ba7ad8ec956362c7c83cfe1a577f204f96c76d5be16a4ac4acb69c8ae23a55/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c253230332d677265656e2e737667)](https://github.com/open-engine/event-dispatcher/blob/master/LICENSE)

Event dispatcher
================

[](#event-dispatcher)

Event
-----

[](#event)

Event can be any class

Dispatch some event
-------------------

[](#dispatch-some-event)

```
$dispatcher = new EventDispatcher($listenerProvier);
$event = $dispatcher->dispatch(new FooEvent());
```

Add listener to some event
--------------------------

[](#add-listener-to-some-event)

```
$config = new ListenerProviderConfig();

$config->addListener(FooEvent::class, function (FooEvent $event) {
    // do somthing
    return $event;
}, 20);

$config->addListener(FooEvent::class, '\Acme\listeners\AnotherListener::methodName');

// add another listeners

$listenerProvider = new ListenerProvider($config);
```

Add listener method parameters:

- $eventClass `string` - Event name. It always equals to event class name
- $listener `callable` - Listener is any callabe wich have only one paramater $event. Listener must return same $event
- $priority `int` - Optiona. Default is 1000. Zero is highest priority

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2725d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/408a5d91df8a0793bc196756e697a14fde20273d13c4a5e77477e44ec82eb2e2?d=identicon)[kadirov.inc](/maintainers/kadirov.inc)

---

Top Contributors

[![kadirov](https://avatars.githubusercontent.com/u/4341071?v=4)](https://github.com/kadirov "kadirov (6 commits)")

---

Tags

phpeventevent dispatcher

### Embed Badge

![Health badge](/badges/open-engine-event-dispatcher/health.svg)

```
[![Health](https://phpackages.com/badges/open-engine-event-dispatcher/health.svg)](https://phpackages.com/packages/open-engine-event-dispatcher)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
