Dispatchable
Less than 1 minute
Dispatchable
Trait Dispatchable.
trait DispatchableProvides a static dispatch method to classes that use this trait. This allows event classes to be easily dispatched without needing to manually instantiate them and pass them to the EventDispatcher.
Methods
dispatch
Dispatches the event using the EventDispatcher singleton.
public dispatch(mixed $args): objectCreates a new instance of the class using this trait with the provided arguments, and then dispatches it through the EventDispatcher.
Parameters
| Parameter | Type | Description |
|---|---|---|
$args | mixed |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:23 +0000