PHPackages                             miguelsaddress/pesy - 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. miguelsaddress/pesy

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

miguelsaddress/pesy
===================

Pesy: PHP Event System

v1.0(10y ago)019MITPHP

Since Mar 26Pushed 10y ago2 watchersCompare

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

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

Pesy: PHP Event SYstem
======================

[](#pesy-php-event-system)

This is an event system that allows you to broadcast events that will be handled by different entities than the emitter.

Paths
=====

[](#paths)

Paths can be unique, such as "myPath:extra:thing" or it can contain a wildcard `*` to show it handles whatever subevent path such as you will see in the case of `another:path:*` which will handle all subpaths like `another:path:like:this` but *IT WILL NOT HANDLE* paths like `another:path`

Initialization:
===============

[](#initialization)

Create a Handler's centre. It will be the main holder of the Handlers. Technically, though any EventHandlerList would do...

```
$handlersCentre = HandlersCentre::getWithHandlers(array(
    'TextFileDump' => new TextFileDumpSampleHandler(array("sample:*")),
    'OtherTextFileDump' => new TextFileDumpSampleHandler(array("another:path:*"))
));
```

Once you have the handlers centre or your list, you can create your emitter, that will emit to the list of handlers registered in the handlers list passed by parameter

```
$eventEmitter = new EventEmitter($handlersCentre->getList());
```

Now, whereever in your code, you can create an event and broadcast it. If th path of the event is handled by any of the handlers, it will be processed. Otherwise, it will be ignored

```
$e = new TestEvent();
$e->setPath("sample:path");
$e->addData("key1", "value1");
$e->addData("key2", array(1,2,3));
$eventEmitter->broadcast($e);
```

This will not be handled, since no handler is listening for this path `wontBeHandled`

```
$e = new TestEvent();
$e->setPath("wontBeHandled");
$e->addData("wontAppear", "in text file");
$eventEmitter->broadcast($e);
```

As told before, this will be handled by the `OtherTextFileDump` handler

```
$e = new TestEvent();
$e->setPath("another:path:like:this");
$e->addData("will appear", "in text file");
$eventEmitter->broadcast($e);
```

Contact
=======

[](#contact)

You can contact me at my twitter: [@miguelsaddress](twitter.com/miguelsaddress)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3696d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/miguelsaddress-pesy/health.svg)

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

###  Alternatives

[shipmonk/name-collision-detector

Simple tool to find ambiguous classes or any other name duplicates within your project.

362.1M34](/packages/shipmonk-name-collision-detector)[bostondv/bootstrap-ninja-forms

Adds Bootstrap classes to Ninja Forms

222.2k](/packages/bostondv-bootstrap-ninja-forms)

PHPackages © 2026

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