PHPackages                             68publishers/event-dispatcher-extra - 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. 68publishers/event-dispatcher-extra

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

68publishers/event-dispatcher-extra
===================================

Extension that adds a combination of global and local event dispatchers with bridge into Nette Framework.

v1.3.0(9mo ago)0996MITPHPPHP ^8.3CI passing

Since Jan 28Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/68publishers/event-dispatcher-extra)[ Packagist](https://packagist.org/packages/68publishers/event-dispatcher-extra)[ RSS](/packages/68publishers-event-dispatcher-extra/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (9)Versions (7)Used By (0)

Event Manager Extra
===================

[](#event-manager-extra)

✨ Extension that adds a combination of global and local event dispatchers with bridge into [Nette Framework](https://nette.org). The global event dispatcher is the one that is registered as a service in DI Container. The local event dispatcher is a unique instance for each created object.

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

[](#installation)

The best way to install 68publishers/event-dispatcher-extra is using Composer:

```
composer require 68publishers/event-dispatcher-extra
```

Integration into Nette Framework
--------------------------------

[](#integration-into-nette-framework)

All you need is register a compiler extension:

```
extensions:
    68publishers.event_dispatcher_extra: SixtyEightPublishers\EventDispatcherExtra\Bridge\Nette\DI\EventDispatcherExtraExtension
```

The extension expects a service of type `Symfony\Component\EventDispatcher\EventDispatcherInterface` in the DI Container so you can use any integration of `symfony/event-dispatcher` into the Nette Framework or you can simply register the service:

```
services:
    -
        type: Symfony\Component\EventDispatcher\EventDispatcher
        factory: Symfony\Component\EventDispatcher\EventDispatcher
```

Example usage
-------------

[](#example-usage)

Service and factory:

```
