-
-
Notifications
You must be signed in to change notification settings - Fork 0
LogEventListenerProvider
github-actions edited this page Apr 6, 2026
·
1 revision
Log every dispatched object through a PSR-3 logger.
- Full name:
\FastForward\EventDispatcher\ListenerProvider\LogEventListenerProvider - Parent class:
\FastForward\EventDispatcher\ListenerProvider\WildcardListenerProvider - This class is marked as final and can't be subclassed
- This class is a Final class
Create a listener that records dispatched events.
public __construct(\Psr\Log\LoggerInterface $logger, string $level = \Psr\Log\LogLevel::INFO): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$logger |
\Psr\Log\LoggerInterface | logger used to record the event |
$level |
string | PSR-3 log level |
Log the provided event.
public __invoke(object $event): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$event |
object | event emitted by the dispatcher |
Handle the provided event.
public __invoke(object $event): void- This method is abstract. Parameters:
| Parameter | Type | Description |
|---|---|---|
$event |
object | event emitted by the dispatcher |
Yield the current listener for any dispatched object.
final public getListenersForEvent(object $event): iterable<callable>- This method is final. Parameters:
| Parameter | Type | Description |
|---|---|---|
$event |
object | event being dispatched |
Return Value:
matching listeners