PHPackages                             logikostech/events - 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. logikostech/events

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

logikostech/events
==================

Events helper for phalcon php projects

v1.0.0(9y ago)05MITPHPPHP &gt;=5.6

Since Apr 8Pushed 9y ago1 watchersCompare

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

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

[![Travis CI](https://camo.githubusercontent.com/f0e0e1250defcb5a11e5a7193cb3e94b1b7e07353e6c9dbfed2c7268784b64c7/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c6f67696b6f73746563682f6576656e74732f6d61737465722e737667)](https://travis-ci.org/logikostech/events)[![Software License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/logikostech/core/master/LICENSE)

Logikos\\Events\\EventsAwareTrait
=================================

[](#logikoseventseventsawaretrait)

Useful trait when using Phalcon\\Events\\EventsAwareInterface. Key feature is the attachEventListener method in that if an EventsManager is not yet being used by the component it will add one and then attach the event. This way you don't have to setup your events manager when you setup the \\Phalcon\\Di services and each controller or library using the componenet can attach their own events as they see fit on a case by case basis.

Usage
-----

[](#usage)

### Add to class

[](#add-to-class)

```
class foo implements \Phalcon\Events\EventsAwareInterface {
  use \Logikos\Events\EventsAwareTrait;
}
```

### Add event handelers with ease

[](#add-event-handelers-with-ease)

#### To listen for all events pass null

[](#to-listen-for-all-events-pass-null)

```
$component->attachEventListener(null, function(\Phalcon\Events\Event $event, $component, $data=null) {
  switch ($event->getType()) {
    case 'beforeAction' :
      // ...
      break;
    case 'afterAction' :
      // ...
      break;
  }
});
```

#### Listen for specific event

[](#listen-for-specific-event)

```
$component->attachEventListener('beforeAction', function(\Phalcon\Events\Event $event, $component, $data=null) {
  // ...
});
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

3318d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22dea9d45991672bd10001bb3cfaf5900bdd27d29322564581dadaa8f863e565?d=identicon)[logikos](/maintainers/logikos)

---

Top Contributors

[![tempcke](https://avatars.githubusercontent.com/u/6674150?v=4)](https://github.com/tempcke "tempcke (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/logikostech-events/health.svg)

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

###  Alternatives

[zhelyabuzhsky/yii2-sitemap

A Yii2 tool to generate sitemap.xml.

3439.7k](/packages/zhelyabuzhsky-yii2-sitemap)[amplifier/yii-amqp

AMQP adapter for Yii

2237.0k](/packages/amplifier-yii-amqp)[bigfork/htmleditorsrcset

Simple srcset integration with SilverStripe’s HTMLEditorField

1025.4k4](/packages/bigfork-htmleditorsrcset)[anasstouaticoder/magento2-module-instantconfigurationcopy

The InstantConfigurationCopy module provides easy way to copy configuration field information for admin in back office Magento 2.

163.8k](/packages/anasstouaticoder-magento2-module-instantconfigurationcopy)

PHPackages © 2026

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