Event Emitter Trait.
This trait contains all the basic functions to implement an EventEmitterInterface.
Using the trait + interface allows you to add EventEmitter capabilities without having to change your base-class.
Methods | ||
---|---|---|
public
|
on(string $eventName, callable $callBack, int $priority = 100)
|
# |
public
|
once(string $eventName, callable $callBack, int $priority = 100)
|
# |
public
|
emit(string $eventName, array $arguments = [], callable $continueCallBack = null): bool
|
# |
public
|
listeners(string $eventName): callable[]
|
# |
public
|
removeListener(string $eventName, callable $listener): bool
|
# |
public
|
removeAllListeners(string $eventName = null)
|
# |