PHP Class Prooph\ServiceBus\Plugin\MessageFactoryPlugin
This plugin listens on the MessageBus::EVENT_INITIALIZE action event.
It checks if the message of the action event is given as an array and
if the array contains a key "message_name".
If both conditions are met the plugin uses the injected Prooph\Common\Messaging\MessageFactory
to translate the message array into a Prooph\Common\Messaging\Message
Show file
Open project: prooph/service-bus
Public Methods
Method |
Description |
|
__construct ( Prooph\Common\Messaging\MessageFactory $messageFactory ) |
|
|
__invoke ( Prooph\Common\Event\ActionEvent $actionEvent ) |
|
|
attach ( Prooph\Common\Event\ActionEventEmitter $dispatcher ) |
|
|
Method Details
__construct()
public method
public __construct ( Prooph\Common\Messaging\MessageFactory $messageFactory ) |
$messageFactory |
Prooph\Common\Messaging\MessageFactory |
|
public __invoke ( Prooph\Common\Event\ActionEvent $actionEvent ) |
$actionEvent |
Prooph\Common\Event\ActionEvent |
|
public attach ( Prooph\Common\Event\ActionEventEmitter $dispatcher ) |
$dispatcher |
Prooph\Common\Event\ActionEventEmitter |
|