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

AbandonedArchivedLibrary

eserozvataf/scabbia2-events
===========================

Scabbia2 Events Component

v0.1.2(10y ago)126Apache-2.0PHPPHP &gt;=5.6.0

Since Sep 16Pushed 10y ago1 watchersCompare

[ Source](https://github.com/eserozvataf/scabbia2-events)[ Packagist](https://packagist.org/packages/eserozvataf/scabbia2-events)[ Docs](http://www.scabbiafw.com/)[ RSS](/packages/eserozvataf-scabbia2-events/feed)WikiDiscussions master Synced 2mo ago

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

Scabbia2 Events Component
=========================

[](#scabbia2-events-component)

[This component](https://github.com/eserozvataf/scabbia2-events) is a simple event dispatcher allows registering callbacks to some events and chain execution of them.

[![Build Status](https://camo.githubusercontent.com/62ccbb9dab38dec6dd2e13a0c6a1860e12a551e97e5a41c9979807a4d7aa1c91/68747470733a2f2f7472617669732d63692e6f72672f657365726f7a76617461662f73636162626961322d6576656e74732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/eserozvataf/scabbia2-events)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/99b2dd9f34cf8d32a8deb95626edc97b2da66850b5f82049a603f9bf4e1d38fa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f657365726f7a76617461662f73636162626961322d6576656e74732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/eserozvataf/scabbia2-events/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/b9ed6149017f5680ff69e66922b8d0ce3e6996a0cb67326362f84af0df20dc8e/68747470733a2f2f706f7365722e707567782e6f72672f657365726f7a76617461662f73636162626961322d6576656e74732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/eserozvataf/scabbia2-events)[![Latest Stable Version](https://camo.githubusercontent.com/5a21eb9f9bf0c095993d2901d4a54ca968f36edfcf7e89e672289ec7b04bca91/68747470733a2f2f706f7365722e707567782e6f72672f657365726f7a76617461662f73636162626961322d6576656e74732f762f737461626c65)](https://packagist.org/packages/eserozvataf/scabbia2-events)[![Latest Unstable Version](https://camo.githubusercontent.com/ace01b24de9adc4d8905ae5c2439810dbc0e1f81c692df7845e196bd66dfd166/68747470733a2f2f706f7365722e707567782e6f72672f657365726f7a76617461662f73636162626961322d6576656e74732f762f756e737461626c65)](https://packagist.org/packages/eserozvataf/scabbia2-events)[![Documentation Status](https://camo.githubusercontent.com/1ebeb3aa2c5cce31b6bf29a03a59cd40727e8fe235ba9ca28824ef1330a81328/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f73636162626961322d646f63756d656e746174696f6e2f62616467652f3f76657273696f6e3d6c6174657374)](https://readthedocs.org/projects/scabbia2-documentation)

Usage
-----

[](#usage)

### Delegates

[](#delegates)

```
use Scabbia\Events\Delegate;

$delegate = new Delegate();

$delegate->subscribe(function (...$parameters) {
    echo 'first subscriber:';
    var_dump($parameters);
});

$delegate->subscribe(function (...$parameters) {
    echo 'second subscriber:';
    echo count($parameters);
});

$delegate->invoke('a', 'b', 'c');
```

### Delegates with priorities

[](#delegates-with-priorities)

```
use Scabbia\Events\Delegate;

$delegate = new Delegate();

// a subscription with priority = 300
$delegate->subscribe(function (...$parameters) {
    echo 'first subscriber:';
    var_dump($parameters);
}, null, 300);

// a subscription with priority = 1 (will be executed first)
$delegate->subscribe(function (...$parameters) {
    echo 'second subscriber, but more important:';
    echo count($parameters);
}, null, 1);

$delegate->invoke('a', 'b', 'c');
```

### Delegates with breaking

[](#delegates-with-breaking)

```
use Scabbia\Events\Delegate;

$delegate = new Delegate();

$delegate->subscribe(function (...$parameters) {
    echo 'first subscriber:';
    var_dump($parameters);

    // breaks the execution
    return false;
});

$delegate->subscribe(function (...$parameters) {
    echo 'second subscriber, but not going to be executed:';
    echo count($parameters);
});

$delegate->invoke('a', 'b', 'c');
```

### Events

[](#events)

```
use Scabbia\Events\Events;

$eventsManager = new Events();

$eventsManager->on('click', function (...$parameters) {
    echo "clicked on x={$parameters[0]} and y={$parameters[1]}!";
});

$eventsManager->on('double_click', function (...$parameters) {
    echo 'double clicked!';
});

$eventsManager->dispatch('click', 5, 10);
```

Links
-----

[](#links)

- [List of All Scabbia2 Components](https://github.com/eserozvataf/scabbia2)
- [Documentation](https://readthedocs.org/projects/scabbia2-documentation)
- [Twitter](https://twitter.com/eserozvataf)
- [Contributor List](contributors.md)
- [License Information](LICENSE)

Contributing
------------

[](#contributing)

It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome. All contributions should be filed on the [eserozvataf/scabbia2-events](https://github.com/eserozvataf/scabbia2-events) repository.

- To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
- To report a bug: If something does not work, please report it using GitHub issues.
- To support: [![Donate](https://camo.githubusercontent.com/630a83896c8ab4a5af0f79046098e3d8713112304fd119d86fa5957a0ecc5159/68747470733a2f2f696d672e736869656c64732e696f2f67726174697061792f657365726f7a76617461662e737667)](https://gratipay.com/eserozvataf/)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

3892d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad4a7ec4c200bd6939df5aac1149f7d8d95aa5b8730a2276981f449c0c12fb18?d=identicon)[eserozvataf](/maintainers/eserozvataf)

---

Top Contributors

[![eser](https://avatars.githubusercontent.com/u/866558?v=4)](https://github.com/eser "eser (18 commits)")

---

Tags

eventsscabbialarukediscabbia2scabbiafw

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  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)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[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)[sabre/event

sabre/event is a library for lightweight event-based programming

35227.4M25](/packages/sabre-event)

PHPackages © 2026

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