class MessageBus implements MessageBusInterface

Methods

__construct(iterable $middlewareHandlers = [])

No description

mixed
dispatch(object|Envelope $message)

Dispatches the given message.

Details

at line 33
__construct(iterable $middlewareHandlers = [])

Parameters

iterable $middlewareHandlers

at line 41
mixed dispatch(object|Envelope $message)

Dispatches the given message.

The bus can return a value coming from handlers, but is not required to do so.

Parameters

object|Envelope $message The message or the message pre-wrapped in an envelope

Return Value

mixed