class Event implements ExtenderInterface
Methods
listen(string $event, callable|string $listener)
Add a listener to a domain event dispatched by flarum or a flarum extension.
subscribe(string $subscriber)
Add a subscriber for a set of domain events dispatched by flarum or a flarum extension.
Details
at
line 33
Event
listen(string $event, callable|string $listener)
Add a listener to a domain event dispatched by flarum or a flarum extension.
at
line 49
Event
subscribe(string $subscriber)
Add a subscriber for a set of domain events dispatched by flarum or a flarum extension.
Event subscribers are classes that may subscribe to multiple events from within the subscriber class itself, allowing you to define several event handlers within a single class.