PHPackages                             iceylan/eventor - 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. iceylan/eventor

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

iceylan/eventor
===============

Simple event emitter and dispatcher for PHP

v1.0.1(1y ago)12MITPHPPHP &gt;=8.1

Since Apr 26Pushed 1y ago1 watchersCompare

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

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

Eventor
=======

[](#eventor)

This is a lightweight event handling system for PHP classes via Trait.

Eventor provides a simple event-driven API to any PHP class without forcing inheritance. Attach event listeners, trigger them, propagate results, and handle listeners with priority and once-only options.

🚀 Installation
--------------

[](#-installation)

```
composer require iceylan/eventor
```

✨ Features
----------

[](#-features)

- Add event-driven behavior to any class via a trait
- Support for `on`, `once`, `off`, `trigger`
- Listener priority system
- Stop event propagation
- Collect listener return values
- Minimal and flexible

🔥 Usage
-------

[](#-usage)

```
use Iceylan\Eventor\ShouldDispatchEvents;
use Iceylan\Eventor\HasEvents;

class User implements ShouldDispatchEvents
{
    use HasEvents;
}

// Example
$user = new User();

$user->on( 'registered', function()
{
    return 'Sending welcome email.';
});

$user->on( 'registered', function()
{
    return 'Logging registration.';
}, priority: 10 );
// Higher priority, runs first

$results = $user->trigger( 'registered' );

print_r($results);
```

Output:

```
[
    'Logging registration.',
    'Sending welcome email.'
]
```

🛠 Advanced Usage
----------------

[](#-advanced-usage)

You can alias trait methods when using the trait, allowing you to customize your API surface:

```
use Iceylan\Eventor\HasEvents;

class Order
{
    use HasEvents {
        on as public addHook;
        off as public removeHook;
        trigger as public runHook;
    }
}

$order = new Order();

$order->addHook( 'something.happened', function()
{
    echo "something happened";
});

$order->runHook( 'something.happened' );
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance48

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Every ~0 days

Total

2

Last Release

387d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c0b08cf02ef675e3989dd80ea4095994d56f50b7abc2c2afaf069766303489e?d=identicon)[ismailceylan](/maintainers/ismailceylan)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/iceylan-eventor/health.svg)

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

###  Alternatives

[bubbstore/correios

Biblioteca que faz cálculo de frete, rastreamento de objetos e consulta de CEP diretamente do Webservice dos Correios.

2589.0k](/packages/bubbstore-correios)

PHPackages © 2026

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