PHPackages                             sakshstore/event-emitter - 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. sakshstore/event-emitter

ActiveLibrary

sakshstore/event-emitter
========================

A simple EventEmitter class for PHP.

00[1 PRs](https://github.com/sakshstore/event-emitter/pulls)PHP

Since Sep 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sakshstore/event-emitter)[ Packagist](https://packagist.org/packages/sakshstore/event-emitter)[ RSS](/packages/sakshstore-event-emitter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP Event Emitter
=================

[](#php-event-emitter)

A simple EventEmitter class for PHP.

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

[](#installation)

You can install the package via Composer:

```
composer require sakshstore/event-emitter
```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

use saksh\SakshEventEmitter\EventEmitter;

$emitter = new EventEmitter();

function example_event_listener($message) {
    echo $message;
}

$emitter->on('greet', 'example_event_listener');
$emitter->emit('greet', 'Hello, World!'); // Output: Hello, World!
$emitter->off('greet', 'example_event_listener');
$emitter->emit('greet', 'Hello again!'); // No output
```

Publish the Package
-------------------

[](#publish-the-package)

To publish your package, create a repository on GitHub (or any other Git hosting service) and push your code there. Then, submit your package to [Packagist](https://packagist.org/) by following their instructions.

Once your package is published, you can install it in any PHP project using Composer:

```
composer require saksh/event-emitter
```

This will allow you to use the EventEmitter class in any PHP project. Let me know if you need any further assistance!

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

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/f280ba407f05fa62359bbfb29f190f8161db2a3956778d0fb779993ae70faa0f?d=identicon)[sakshstore](/maintainers/sakshstore)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/sakshstore-event-emitter/health.svg)

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

PHPackages © 2026

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