PHPackages                             patryknamyslak/patflow - 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. patryknamyslak/patflow

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

patryknamyslak/patflow
======================

An event driven dispatch system for php

v1.2(4mo ago)06MITPHP

Since Feb 10Pushed 4mo agoCompare

[ Source](https://github.com/PatrykNamyslak/PatFlow)[ Packagist](https://packagist.org/packages/patryknamyslak/patflow)[ RSS](/packages/patryknamyslak-patflow/feed)WikiDiscussions main Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

PatFlow - Event Dispatching System
==================================

[](#patflow---event-dispatching-system)

Demo:
-----

[](#demo)

### TestEvent:

[](#testevent)

```
namespace PatrykNamyslak\PatFlow\Demo;

use PatrykNamyslak\PatFlow\Blueprints\Event;

class TestEvent extends Event{
    // Add a custom property to capture extra data to then later use in the Listener::handle() method
    public function __construct(protected string $message){
        parent::__construct();
    }
}
```

### TestListener:

[](#testlistener)

```
namespace PatrykNamyslak\PatFlow\Demo;

use PatrykNamyslak\PatFlow\Blueprints\Event;
use PatrykNamyslak\PatFlow\Blueprints\Listener;

class TestListener extends Listener{
    public function handle(Event $event): void{
        echo "Event triggered! at: {$event->timestamp} and a message was left here it is: {$event->message}";
    }
}
```

### TestServiceProvider:

[](#testserviceprovider)

```
namespace PatrykNamyslak\PatFlow\Demo;

use PatrykNamyslak\PatFlow\Blueprints\ServiceProvider;

class TestServiceProvider extends ServiceProvider{
    // Define your event => array of listeners that are triggered on event fire
    public array $listen = [
        TestEvent::class => [TestListener::class],
    ];
}
```

Usage:
------

[](#usage)

```
use PatrykNamyslak\PatFlow\Demo\TestEvent;
use PatrykNamyslak\PatFlow\Demo\TestServiceProvider;

$dispatcher = new Dispatcher();

$serviceProvider = new TestServiceProvider(dispatcher: $dispatcher);
$serviceProvider->register();
$dispatcher->dispatch(new TestEvent(message: "Greetings My friend"));
```

```
OUTPUT: Event triggered! at: 1770753871.8842 and a message was left here it is: Greetings My friend

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance77

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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 ~10 days

Total

3

Last Release

124d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65c81cbbb028fa73196ab7a01c410588bc79f2f09350597f58d65f8c5801099f?d=identicon)[PatrykNamyslak](/maintainers/PatrykNamyslak)

---

Top Contributors

[![PatrykNamyslak](https://avatars.githubusercontent.com/u/143219631?v=4)](https://github.com/PatrykNamyslak "PatrykNamyslak (11 commits)")

### Embed Badge

![Health badge](/badges/patryknamyslak-patflow/health.svg)

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

###  Alternatives

[humanmade/asset-loader

Utilities to seamlessly consume Webpack-bundled assets in WordPress themes &amp; plugins.

27343.2k20](/packages/humanmade-asset-loader)[moosend/website-tracking

By installing the Moosend PHP Tracking library you are can track page views, product views, add to cart events and successful purchases. You can later use these details to segment your user base, run automations, check how successful your latest promo has been and how many conversions your landing page has led to.

1121.9k1](/packages/moosend-website-tracking)

PHPackages © 2026

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