PHPackages                             strukt/event - 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. strukt/event

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

strukt/event
============

No event loop included!

v1.1.0(1y ago)06923MITPHPPHP ^8.1

Since Feb 26Pushed 5mo ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (6)Used By (3)

Strukt Event
============

[](#strukt-event)

This is not an `event-loop` it has events and loops.

Events
------

[](#events)

```
$cred = array("uname"=>"admin", "pword"=>"p@55w0rd");
$login = Strukt\Event::create(fn($uname, $pword)=>$uname == $cred["uname"] && $pword == $cred["pword"]);
$isLoggedIn = $login->apply("admin","p@55w0rd")->exec();
// $isLoggedIn = $login->applyArgs($credentials)->exec();
```

Reflector
---------

[](#reflector)

```
// $r = Strukt\Ref::createFrom(new Payroll\User);
$r = ref(Payroll\User::class);
$r->getRef();//ReflectionClass
//$r->noMake();//newInstanceWithoutConstructor
$r->make("pitsolu");//newInstanceArgs
$r->getInstance();//InstanceOf Payroll\AuthModule\Model\User
$r->prop("id")->getRef();//ReflectionProperty
$r->prop("id")->set(1);
$r->prop("id")->get();//1
$r->method("getUsername")->invoke();//pitsolu
$r->method("getUsername")->getRef(); //ReflectionMethod
$r->method("getUsername")->getClosure();//Closure
ref("array_sum")->invoke([1,2]);//3
ref("array_sum")->getRef();//ReflectionFunction
```

Loop
----

[](#loop)

```
use Strukt\Loop;
# use Strukt\Cmd;

Loop::add("auth", ["admin", "p@55w0rd"], function($username, $password){

	echo sprintf("username:%s|password:%s\n", $username, $password);
});

Loop::add("help", function(){

	echo "Docs\n";
});

// Loop::add("hello", function($name){

// 	echo sprintf("Hello %s", $name);
// });

Loop::run();
// Cmd::exec("help");
// Cmd::exec("auth", ["peter", "pazzw0rd"]);
// Cmd::exec("hello", ["World"]);
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance60

Regular maintenance activity

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.6% 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 ~264 days

Total

4

Last Release

382d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.4

v1.1.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f77a56030c77ce25f7fcf6db800e45bb6a31bf3c07740b43aeabcdf5e9edec2?d=identicon)[pitsolu](/maintainers/pitsolu)

---

Top Contributors

[![samweru](https://avatars.githubusercontent.com/u/104033121?v=4)](https://github.com/samweru "samweru (17 commits)")[![pitsolu](https://avatars.githubusercontent.com/u/16669704?v=4)](https://github.com/pitsolu "pitsolu (12 commits)")

### Embed Badge

![Health badge](/badges/strukt-event/health.svg)

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

###  Alternatives

[snapshotpl/zf-snap-geoip

MaxMind GeoIP Module for Zend Framework 2

1512.9k](/packages/snapshotpl-zf-snap-geoip)

PHPackages © 2026

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