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

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

jemer/event-dispatcher
======================

create, manages, fires events during your project runtime

08PHP

Since Aug 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/J-Emer/EventDispatcher)[ Packagist](https://packagist.org/packages/jemer/event-dispatcher)[ RSS](/packages/jemer-event-dispatcher/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (1)Used By (0)

EventDispatcher
===============

[](#eventdispatcher)

Creates, Manages, and Fires events during your project runtime

```
composer require jemer/event-dispatcher dev-main

```

Adding Events
-------------

[](#adding-events)

Events are added on creation.

```
$manger = new Manager([
    'load',
    'unload',
    'before_render',
    'after_render'
]);
```

This will add `load` `unlodad` `before_render` `after_render` events that you can hook into. *Note you can add your own events and call them whatever you want.*

Handling Events
---------------

[](#handling-events)

Events can either be handled by a Closure, or a Class.

### Closure

[](#closure)

```
$manger->Register('load', function()
{
    echo "this will run when the Load event get triggered";
});
```

### Class

[](#class)

```

```

When using a class to handle your events you must use the `Load()` and `Run()`. Use `Load()` to load in any resources you will need, and use `Run()` to handle your event. Load is called immediately before Run . When using a Closure there is no `Load()`.

Firing an Event
---------------

[](#firing-an-event)

In your project when you need to fire off an event such as `load` simply

```
$manger->FireEvent('load');
```

This will fire off the `load` event.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/61d4bd4e6dee5b06ab7b7d0832d472ebeb41f07c86f4c2da54b45aed93e20fec?d=identicon)[J-Emer](/maintainers/J-Emer)

---

Top Contributors

[![J-Emer](https://avatars.githubusercontent.com/u/90985256?v=4)](https://github.com/J-Emer "J-Emer (7 commits)")

### Embed Badge

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

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

###  Alternatives

[byjg/singleton-pattern

A lightweight PHP implementation of the Design Pattern Singleton using trait.

1055.4k2](/packages/byjg-singleton-pattern)[corneltek/assetkit

High performance asset manager.

531.4k3](/packages/corneltek-assetkit)[kriss/webman-eloquent-ide-helper

webman-eloquent-ide-helper plugin

142.7k](/packages/kriss-webman-eloquent-ide-helper)

PHPackages © 2026

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