PHPackages                             mic2100/events - 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. mic2100/events

ActiveLibrary

mic2100/events
==============

08PHP

Since May 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mic2100/events)[ Packagist](https://packagist.org/packages/mic2100/events)[ RSS](/packages/mic2100-events/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Events Library
==============

[](#events-library)

[![Build Status](https://camo.githubusercontent.com/abfaf4962845fe0541576d055b7a50321f0087d2da9f89fc2b8e82529cfdbcfa/68747470733a2f2f7472617669732d63692e6f72672f6d6963323130302f6576656e74732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mic2100/events)[![Coverage Status](https://camo.githubusercontent.com/f083b463c1ff68b00daa5c034daa7c8e75a5326274a4ab284ed07248e5b0c212/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d6963323130302f6576656e74732f62616467652e737667)](https://coveralls.io/github/mic2100/events)

Instructions
------------

[](#instructions)

### Events

[](#events)

Events can either extend the `AbstractEvent` class or implement the `EventInterface`Some simple examples

```
class SampleEventOne extends AbstractEvent
{
    protected $handle = 'sample-event-one';

    public function handle(array $params = null) : bool
    {
        return true;
    }
}
class SampleEventTwo extends AbstractEvent
{
    protected $handle = 'sample-event-two';

    public function handle(array $params = null) : bool
    {
        return true;
    }
}
```

### Dispatching

[](#dispatching)

When you have created some events you can add them to the dispatcher. With this you can trigger events using the handle or using a wildcard to trigger multiple events.

```
$dispatcher = new Dispatcher;
$dispatcher->addEvent(new SampleEventOne);
$dispatcher->addEvent(new SampleEventTwo);
$dispatcher->addEvent(new SampleEventTwo, 'custom-handle-one');

$dispatcher->trigger('custom-handle-one'); //triggers one event
$dispatcher->trigger('sample-event*'); //triggers two events
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd22019623ac7e0ed3b0680eb602a6794fbbd4467ba905fa3ab07bfc962069ce?d=identicon)[mic2100](/maintainers/mic2100)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/mic2100-events/health.svg)

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

PHPackages © 2026

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