Download the PHP package zorachka/event-dispatcher without Composer
On this page you can find all versions of the php package zorachka/event-dispatcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zorachka/event-dispatcher
More information about zorachka/event-dispatcher
Files in zorachka/event-dispatcher
Package event-dispatcher
Short Description Event Dispatcher
License MIT
Homepage https://github.com/zorachka/event-dispatcher
Informations about the package event-dispatcher
Zorachka Event Dispatcher
This is PSR-14 Event Dispatcher pretty simple implementation and framework-agnostic solution.
Why another one?
Because:
- you want to follow standard and don't worry about implementation. You can change this provider to another one anytime;
- you don't need complicated and overhead solution;
- you want easy configure and use event dispatcher.
Requirements
- The minimum PHP version is 8.0.
Installation
You can install the package via composer:
Usage
For standalone usage example below. In your entity you need to register event:
Configure Psr\EventDispatcher\EventDispatcherInterface
:
Of course that is better to use DI and you can take
definitions from Zorachka\EventDispatcher\EventDispatcherServiceProvider
class.
After that in your application you can easily inject Psr\EventDispatcher\EventDispatcherInterface
.
Also, you can configure listeners for events pass them into config:
And even set priority (ListenerPriority::NORMAL
by default):
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Siarhei Bautrukevich
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of event-dispatcher with dependencies
psr/event-dispatcher Version ^1.0
webmozart/assert Version ^1.11
zorachka/container Version ^3.1