PHP Class Prooph\ServiceBus\QueryBus

The query bus dispatches a query message to a finder. The query is maybe dispatched async so the bus returns a promise which gets either resolved with the response of the finder or rejected with an exception. Additionally the finder can provide an update status but this is not guaranteed.
Author: Alexander Miertsch ([email protected])
Inheritance: extends MessageBus
显示文件 Open project: prooph/service-bus Class Usage Examples

Public Methods

Method Description
dispatch ( mixed $query ) : Promise
setActionEventEmitter ( Prooph\Common\Event\ActionEventEmitter $actionEventDispatcher ) : void Inject an ActionEventDispatcher instance

Method Details

dispatch() public method

public dispatch ( mixed $query ) : Promise
$query mixed
return React\Promise\Promise

setActionEventEmitter() public method

Inject an ActionEventDispatcher instance
public setActionEventEmitter ( Prooph\Common\Event\ActionEventEmitter $actionEventDispatcher ) : void
$actionEventDispatcher Prooph\Common\Event\ActionEventEmitter
return void