PHP Class Prooph\ServiceBus\Plugin\ServiceLocatorPlugin
This plugin can be used to lazy load message handlers.
Initialize it with a Interop\Container\ContainerInterface
and route your messages to the service id only.
Mostra file
Open project: prooph/service-bus
Class Usage Examples
Protected Properties
Property |
Type |
Description |
|
$serviceLocator |
Interop\Container\ContainerInterface |
|
|
Public Methods
Method |
Description |
|
__construct ( Interop\Container\ContainerInterface $serviceLocator ) |
|
|
attach ( Prooph\Common\Event\ActionEventEmitter $events ) : void |
|
|
onLocateMessageHandler ( Prooph\Common\Event\ActionEvent $actionEvent ) |
|
|
Method Details
__construct()
public method
public __construct ( Interop\Container\ContainerInterface $serviceLocator ) |
$serviceLocator |
Interop\Container\ContainerInterface |
|
public attach ( Prooph\Common\Event\ActionEventEmitter $events ) : void |
$events |
Prooph\Common\Event\ActionEventEmitter |
|
return |
void |
|
onLocateMessageHandler()
public method
public onLocateMessageHandler ( Prooph\Common\Event\ActionEvent $actionEvent ) |
$actionEvent |
Prooph\Common\Event\ActionEvent |
|
Property Details
$serviceLocator protected_oe property
protected ContainerInterface,Interop\Container $serviceLocator |
return |
Interop\Container\ContainerInterface |
|