PHPackages                             poirot/perevent - 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. poirot/perevent

ActiveLibrary

poirot/perevent
===============

082PHP

Since Aug 29Pushed 8y ago2 watchersCompare

[ Source](https://github.com/phPoirot/Perevent)[ Packagist](https://packagist.org/packages/poirot/perevent)[ RSS](/packages/poirot-perevent/feed)WikiDiscussions devel Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Perevent
========

[](#perevent)

Event Store

```
$client = new \MongoDB\Client('mongodb://db-master-mongo:27017/');
$db     = $client->selectDatabase('apanaj');

$repo   = new \Poirot\Perevent\Repo\RepoMongo($db, 'perevents');

$insert = function () use ($repo) {
    $repo->insert(new \Poirot\Perevent\Entity\PereventEntity([
        'uid'      => 'x12345',
        'exec_map' => 'time',
        'args'     => [
            'a1' => 1,
            'a2' => 2,
        ],
        'datetime_expiration' => new DateTime(time()+1000)
    ]));
};

class ci
    implements \Poirot\Perevent\Interfaces\Features\iRepositoryAware
{
    /** @var \Poirot\Perevent\Interfaces\iRepoPerEvent */
    protected $repo;

    function __invoke($a1, $a2, $uid)
    {
        if ($this->repo)
            echo 'Repository injected.';

        $this->repo->deleteOneByUID($uid);
        return time();
    }

    /**
     * @param \Poirot\Perevent\Interfaces\iRepoPerEvent $repo
     * @return mixed
     */
    function setRepository(\Poirot\Perevent\Interfaces\iRepoPerEvent $repo)
    {
        $this->repo = $repo;
    }
}

$m = new \Poirot\Perevent\ManagerOfPerevents([
    'repository' => $repo,
    'plugins'    => [
        'services' => [
            'time' => 'ci'
        ],
    ],
]);

$r = $m->fireEvent('x12345');
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.9% 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/1f784f9dfb58e36b6a876f3057e5664bb904af71d30bb2023583118138dffe9a?d=identicon)[Payam](/maintainers/Payam)

---

Top Contributors

[![E1101](https://avatars.githubusercontent.com/u/427575?v=4)](https://github.com/E1101 "E1101 (11 commits)")[![mostafakml](https://avatars.githubusercontent.com/u/14137361?v=4)](https://github.com/mostafakml "mostafakml (6 commits)")[![mehomeho](https://avatars.githubusercontent.com/u/13287591?v=4)](https://github.com/mehomeho "mehomeho (2 commits)")

### Embed Badge

![Health badge](/badges/poirot-perevent/health.svg)

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

PHPackages © 2026

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