PHPackages                             nacosvel/mitt - 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. nacosvel/mitt

ActiveLibrary

nacosvel/mitt
=============

The Nacosvel Components

v1.0.0(1y ago)06MITPHPPHP &gt;=8.0

Since Sep 12Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

The Nacosvel Components
=======================

[](#the-nacosvel-components)

[![GitHub Tag](https://camo.githubusercontent.com/3ab8b48f1f4d99b183db046f96ba2f5e1a5c6f5f36e6f44289619594a8ccc46b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6e61636f7376656c2f6d697474)](https://github.com/nacosvel/mitt/tags)[![Total Downloads](https://camo.githubusercontent.com/967bc46bcda9196bd55dbd7ede42643464d6a985b6da93320764ec264fed177e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e61636f7376656c2f6d6974743f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nacosvel/mitt)[![Packagist Version](https://camo.githubusercontent.com/b6dff19563baebbf0bd0c99bef8eca89a9d6351f2883f9eca4463f27dd1641d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e61636f7376656c2f6d697474)](https://packagist.org/packages/nacosvel/mitt)[![Packagist PHP Version Support](https://camo.githubusercontent.com/2bfeb6fd98caad16f89da0f574af0137ad0f53b7ffab1b95f749af5b0d837209/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e61636f7376656c2f6d697474)](https://github.com/nacosvel/mitt)[![Packagist License](https://camo.githubusercontent.com/0fda1234bd96193d131717b4f334ed2fcc0dd619fccbd3f3a79d08cecee2d473/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e61636f7376656c2f6d697474)](https://github.com/nacosvel/mitt)

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

[](#installation)

You can install the package via [Composer](https://getcomposer.org/):

```
composer require nacosvel/mitt
```

Usage
-----

[](#usage)

### Registering an Event Listener

[](#registering-an-event-listener)

Use the on method to register a listener for an event:

```
$mitt = new \Nacosvel\Mitt\Emitter();

$mitt->on('user.registered', function ($user) {
    echo "User registered: {$user->name}";
});
```

### Emitting Events

[](#emitting-events)

Use the emit method to trigger an event:

```
$user = new User(['name' => 'John Doe']);
$mitt->emit('user.registered', $user);
```

### Removing an Event Listener

[](#removing-an-event-listener)

Use the off method to remove a listener:

```
$mitt->off('user.registered');
```

### One-Time Listener

[](#one-time-listener)

Use the once method to register a listener that will be triggered only once:

```
$mitt->once('user.updated', function ($user) {
    echo "User updated: {$user->name}";
});
```

Example
-------

[](#example)

```
$mitt = new \Nacosvel\Mitt\Emitter();

$mitt->on('order.created', function ($order) {
    echo "Order created: {$order->id}";
});

$mitt->emit('order.created', ['id' => 123]);
```

License
-------

[](#license)

Nacosvel Mitt is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

614d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2da9b458375a1b7972b7c4d26a5bf8f3e48db305e8805da36f253956f33c5568?d=identicon)[jundayw](/maintainers/jundayw)

---

Top Contributors

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

---

Tags

Nacosvel Mitt

### Embed Badge

![Health badge](/badges/nacosvel-mitt/health.svg)

```
[![Health](https://phpackages.com/badges/nacosvel-mitt/health.svg)](https://phpackages.com/packages/nacosvel-mitt)
```

PHPackages © 2026

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