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

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

flamecore/event-observer
========================

Watch events and react to them

v1.0.0(10y ago)315.9k1[1 issues](https://github.com/flamecore/event-observer/issues)1ISCPHPPHP &gt;=5.4

Since Aug 3Pushed 10y ago6 watchersCompare

[ Source](https://github.com/flamecore/event-observer)[ Packagist](https://packagist.org/packages/flamecore/event-observer)[ Docs](http://www.flamecore.org)[ RSS](/packages/flamecore-event-observer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (1)

FlameCore EventObserver
=======================

[](#flamecore-eventobserver)

[![Latest Stable](https://camo.githubusercontent.com/9b29ce696aade64122473b099daa37fa4810fbebfa0666fb3476a0c5cad3b3ec/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c616d65636f72652f6576656e742d6f627365727665722e737667)](https://packagist.org/packages/flamecore/event-observer)[![Build Status](https://camo.githubusercontent.com/7ce335a11417e65163631e95be51c931e522cf7fe7428f61d108a810ece83aa2/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f466c616d65436f72652f4576656e744f627365727665722e737667)](https://travis-ci.org/FlameCore/EventObserver)[![Scrutinizer](https://camo.githubusercontent.com/7e667f5f3b968119a40d51e8f099c1b14434c983dfed0eec02923bdebee49fbf/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f466c616d65436f72652f4576656e744f627365727665722e737667)](https://scrutinizer-ci.com/g/FlameCore/EventObserver)[![Coverage](https://camo.githubusercontent.com/fb6e12a6767e9c2fcb98d258e3113054acaa94d925469482a079a87bf6db9cd4/687474703a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652f6769746875622f466c616d65436f72652f4576656e744f627365727665722e737667)](https://codeclimate.com/github/FlameCore/EventObserver/coverage)[![License](https://camo.githubusercontent.com/08bcac4a73727ff53be94fa6c4f8875a9efea796813a17770f341a1644100900/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f666c616d65636f72652f6576656e742d6f627365727665722e737667)](http://www.flamecore.org/projects/event-observer)

This library allows you to watch events and react to them.

Usage instructions and more information can be found [in our Wiki](https://github.com/FlameCore/EventObserver/wiki).

Getting Started
---------------

[](#getting-started)

Create a new Responder object which holds the event listeners:

```
$responder = new Responder();
$responder->setListener('action.event', function (array $data, $event) {
    print_r($data);
});
```

Create a new Observer object and give it some actions to react to:

```
$observer = new Observer();
$observer->addResponder('action', $responder);
```

Notify the Observer of events (optionally with data):

```
$observer->notify('action.event');
$observer->notify('action.event', ['some_data' => 123.4]);
```

Installation
------------

[](#installation)

### Install via Composer

[](#install-via-composer)

Create a file called `composer.json` in your project directory and put the following into it:

```
{
    "require": {
        "flamecore/event-observer": "1.0.*"
    }
}

```

[Install Composer](https://getcomposer.org/doc/00-intro.md#installation-nix) if you don't already have it present on your system:

```
$ curl -sS https://getcomposer.org/installer | php

```

Use Composer to [download the vendor libraries](https://getcomposer.org/doc/00-intro.md#using-composer) and generate the vendor/autoload.php file:

```
$ php composer.phar install

```

Include the vendor autoloader and use the classes:

```
namespace Acme\MyApplication;

use FlameCore\EventObserver\Observer;
use FlameCore\EventObserver\Responder\Responder;

require_once 'vendor/autoload.php';
```

Requirements
------------

[](#requirements)

- You must have at least PHP version 5.4 installed on your system.

Contributors
------------

[](#contributors)

If you want to contribute, please see the [CONTRIBUTING](CONTRIBUTING.md) file first.

Thanks to the contributors:

- Christian Neff (secondtruth)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

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

Every ~81 days

Total

2

Last Release

3860d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82268b2432ab90f14c62445938bc3cd1340dc66e0463035df57891826b418016?d=identicon)[secondtruth](/maintainers/secondtruth)

---

Top Contributors

[![secondtruth](https://avatars.githubusercontent.com/u/416441?v=4)](https://github.com/secondtruth "secondtruth (20 commits)")

---

Tags

event-listenermediatorphp-libraryeventsdispatchermediator

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[doctrine/event-manager

The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.

6.1k501.1M115](/packages/doctrine-event-manager)[psr/event-dispatcher

Standard interfaces for event handling.

2.3k618.8M865](/packages/psr-event-dispatcher)[laminas/laminas-eventmanager

Trigger and listen to events within a PHP application

1.0k69.8M225](/packages/laminas-laminas-eventmanager)[simshaun/recurr

PHP library for working with recurrence rules

1.6k15.7M40](/packages/simshaun-recurr)[chelout/laravel-relationship-events

Missing relationship events for Laravel

5252.3M17](/packages/chelout-laravel-relationship-events)[tormjens/eventy

The WordPress filter/action system in Laravel

438912.9k16](/packages/tormjens-eventy)

PHPackages © 2026

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