EventHandler
class EventHandler
Properties
| static protected array<class-string, string> | $eventHandlerMap | Map event handlers to events. |
|
| static protected array<class-string, string> | $authEventHandlerMap | Map authentication event handlers to events. |
Methods
Pass through the event and capture any errors.
Handle a SQL transaction event (begin, commit, rollback).
Send the telemetry buffered while the server booted.
Flush buffered telemetry and stop accepting new transport work.
Handle a Sanctum token authenticated event.
Details
at line 85
__construct(Container $container, array $config)
Create a new event handler instance.
at line 100
void
subscribe(Dispatcher $dispatcher)
Attach all event handlers.
at line 124
void
subscribeAuthEvents(Dispatcher $dispatcher)
Attach all authentication event handlers.
at line 134
void
__call(string $method, array $arguments)
Pass through the event and capture any errors.
at line 156
protected void
routeMatchedHandler(RouteMatched $match)
Handle a route matched event.
at line 175
protected void
queryExecutedHandler(QueryExecuted $query)
Handle a SQL query executed event.
at line 204
protected void
transactionEventHandler(TransactionBeginning|TransactionCommitted|TransactionRolledBack $event)
Handle a SQL transaction event (begin, commit, rollback).
at line 219
protected void
messageLoggedHandler(MessageLogged $logEntry)
Handle a message logged event.
at line 235
protected void
beforeServerForkHandler(BeforeServerFork $event)
Send the telemetry buffered while the server booted.
Every forked process would otherwise inherit and send its own copy.
at line 243
protected void
workerExitHandler(OnWorkerExit $event)
Flush buffered telemetry and stop accepting new transport work.
at line 271
protected void
authenticatedHandler(Authenticated $event)
Handle an authenticated event.
at line 279
protected void
sanctumTokenAuthenticatedHandler(TokenAuthenticated $event)
Handle a Sanctum token authenticated event.