elephox / events
Elephox events library.
v0.7.0
2022-09-09 21:40 UTC
Requires
- php: ^8.1 <8.3
- elephox/collection: dev-develop
- jetbrains/phpstorm-attributes: ^1.0
- dev-develop
- 0.9.0.x-dev
- 0.8.0.x-dev
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.3
- 0.4.0
- 0.4.0-alpha5
- 0.4.0-alpha4
- 0.4.0-alpha3
- 0.4.0-alpha2
- 0.4.0-alpha1
- 0.3.27
- v0.3.25
- v0.3.24
- v0.3.23
- v0.3.22
- v0.3.21
- v0.3.20
- v0.3.18
- v0.3.17
- v0.3.16
- v0.3.15
- v0.3.14
- v0.3.13
- v0.3.12
- v0.3.11
- v0.3.10
- v0.3.9
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- dev-release/0.9
- dev-release/0.8
- dev-release/0.7
- dev-release/0.6.0
- dev-16-psr-20-clock
- dev-18-make-servicecollection-more-extensible
- dev-release/0.6
- dev-release/0.5
- dev-release/0.4
- dev-release/0.3
This package is auto-updated.
Last update: 2024-10-05 18:13:10 UTC
README
This module is used by Elephox to provide an event bus with broadcasters and listeners.
Example
<?php use Elephox\Events\EventBus; $bus = new EventBus(); $subscription = $bus->subscribe('test', function ($data) { echo 'test event: ' . $data; }); $bus->publish('test', 'test data'); // "test event: test data" $bus->unsubscribe($subscription); $bus->publish('test', 'test data'); // no output