class Event implements ExtenderInterface
Methods
listen(string $event, callable|string $listener)
<p>Add a listener to a domain event dispatched by flarum or a flarum extension.</p>
subscribe(string $subscriber)
<p>Add a subscriber for a set of domain events dispatched by flarum or a flarum extension.</p>
Details
at
line 35
Event
listen(string $event, callable|string $listener)
<p>Add a listener to a domain event dispatched by flarum or a flarum extension.</p>
at
line 52
Event
subscribe(string $subscriber)
<p>Add a subscriber for a set of domain events dispatched by flarum or a flarum extension.</p>
<p>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.</p>