mini\Hooks\Trigger class

Documentation

Event that can only trigger ONCE Late subscribers are called immediately with the original trigger data

Inheritance

Extends: mini\Hooks\Dispatcher

Properties (3)

protected bool $triggered
protected array $data
protected array $listeners

Methods (16)

Has this trigger already fired?

Activate the trigger and run all listeners

Subscribe to this trigger

Unsubscribe from this trigger

Documentation missing

Get a description of the event dispatcher

Get the filename where this event dispatcher was created

Get the line number where this event dispatcher was created

Configure event loop integration

Invoke all listeners in an array

Handle an exception from a listener

Filter array to remove specific values

Schedule a function to run when runEvents() is called

Run all scheduled events

Remove values from multiple arrays by reference

Invoke a listener with exception handling

Source

src/Hooks/Trigger.php:14-75