PHP Класс 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
Автор: Alexander Miertsch ([email protected])
Наследование: implements Prooph\Common\Event\ActionEventListenerAggregate, use trait Prooph\Common\Event\DetachAggregateHandlers
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Prooph\Common\Messaging\MessageFactory $messageFactory )
__invoke ( Prooph\Common\Event\ActionEvent $actionEvent )
attach ( Prooph\Common\Event\ActionEventEmitter $dispatcher )

Описание методов

__construct() публичный Метод

public __construct ( Prooph\Common\Messaging\MessageFactory $messageFactory )
$messageFactory Prooph\Common\Messaging\MessageFactory

__invoke() публичный Метод

public __invoke ( Prooph\Common\Event\ActionEvent $actionEvent )
$actionEvent Prooph\Common\Event\ActionEvent

attach() публичный Метод

public attach ( Prooph\Common\Event\ActionEventEmitter $dispatcher )
$dispatcher Prooph\Common\Event\ActionEventEmitter