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
파일 보기 프로젝트 열기: prooph/service-bus

공개 메소드들

메소드 설명
__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