PHPackages                             socketio-php/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. socketio-php/emitter

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

socketio-php/emitter
====================

event emitter

v1.0(6y ago)11.0k↓43.8%MITPHPPHP &gt;=7.1.22CI failing

Since Mar 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/socketIo-php/emitter)[ Packagist](https://packagist.org/packages/socketio-php/emitter)[ RSS](/packages/socketio-php-emitter/feed)WikiDiscussions master Synced 1mo ago

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

Emitter
=======

[](#emitter)

Event emitter component.

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

[](#installation)

```
$ composer install socketio-php/emitter

```

Test
----

[](#test)

```
➜  emitter git:(master) ✗ php vendor/bin/phpunit tests/EmitterTest.php
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

..........                                                        10 / 10 (100%)

Time: 24 ms, Memory: 4.00 MB

OK (10 tests, 10 assertions)
```

API
---

[](#api)

### Emitter#on(event, fn)

[](#emitteronevent-fn)

Register an `event` handler `fn`.

### Emitter#once(event, fn)

[](#emitteronceevent-fn)

Register a single-shot `event` handler `fn`, removed immediately after it is invoked the first time.

### Emitter#off(event, fn)

[](#emitteroffevent-fn)

- Pass `event` and `fn` to remove a listener.
- Pass `event` to remove all listeners on that event.
- Pass nothing to remove all listeners on all events.

### Emitter#emit(event, ...)

[](#emitteremitevent-)

Emit an `event` with variable option args.

### Emitter#listeners(event)

[](#emitterlistenersevent)

Return an array of callbacks, or an empty array.

### Emitter#hasListeners(event)

[](#emitterhaslistenersevent)

Check if this emitter has `event` handlers.

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

2253d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69c5499d6c0cfaf088d63b3f9cb7ccff477dbd76c3d38536d78c6e960d7b4fc6?d=identicon)[ccinn](/maintainers/ccinn)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/socketio-php-emitter/health.svg)

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

###  Alternatives

[pluginscart/dynamodb-php

Access AWS DynamoDB through simpler interface in PHP.

1114.0k](/packages/pluginscart-dynamodb-php)

PHPackages © 2026

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