PHPackages                             wandersonwhcr/phact - 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. [Framework](/categories/framework)
4. /
5. wandersonwhcr/phact

AbandonedArchivedLibrary[Framework](/categories/framework)

wandersonwhcr/phact
===================

A Simple Event Propagation with Phalcon Framework

v1.0.0(11y ago)8601BSD-3-ClausePHP

Since Sep 25Pushed 11y ago1 watchersCompare

[ Source](https://github.com/wandersonwhcr/phact)[ Packagist](https://packagist.org/packages/wandersonwhcr/phact)[ RSS](/packages/wandersonwhcr-phact/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Phact
=====

[](#phact)

Phact is a simple event propagation usage with Phalcon Framework. With Phact you can create a set of nodes, write some events and execute them with some order.

Example
-------

[](#example)

```
use Phact\Manager;
use Phact\NodeInterface;
use Phalcon\Events\Event;
use Phalcon\Events\Manager as EventsManager;

class A implements NodeInterface
{
    public function onExecute(Event $event, NodeInterface $node)
    {
        if ($node instanceof self) { // or $event->getData() == 'A'
            echo "A!";
        }
    }
}

class B implements NodeInterface
{
    public function onBeforeExecute(Event $event, NodeInterface $node)
    {
        if ($node instanceof A) { // or $event->getData() == 'A'
            echo "B before A! ";
        }
    }
}

$manager = (new Manager())
    ->setEventsManager(new EventsManager())
    ->add('A', new A())
    ->add('B', new B());

$manager->execute('A'); // outputs "B before A! A!"
```

Composer
--------

[](#composer)

You can install `Phact` inside your project with Composer.

```
{
    "require": {
        "wandersonwhcr/phact": "1.*"
    }
}
```

Usage
-----

[](#usage)

You can implement three methods using `NodeInterface`:

```
use Phact\NodeInterface;
use Phalcon\Events\Event;

class Node implements NodeInterface
{
    public function onBeforeExecute(Event $event, NodeInterface $node)
    {
    }

    public function onExecute(Event $event, NodeInterface $node)
    {
    }

    public function onAfterExecute(Event $event, NodeInterface $node)
    {
    }
}
```

With these events, you can order your node executions and create awesome events propagation like installers or database structure changes.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

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

4251d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/907c8faa9e7d6e1777b18bafcc2b94909b1b82a9fe15b462fb18b02f88a00da1?d=identicon)[wandersonwhcr](/maintainers/wandersonwhcr)

---

Top Contributors

[![wandersonwhcr](https://avatars.githubusercontent.com/u/5286703?v=4)](https://github.com/wandersonwhcr "wandersonwhcr (10 commits)")

### Embed Badge

![Health badge](/badges/wandersonwhcr-phact/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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