Instead of providing a module, a bundle, a bridge or similar framework integration prooph/service-bus ships with
interop factories.
The concept behind these factories is simple but powerful. It allows us to provide you with bootstrapping logic for the message buses without the need to rely on a specific framework. However, the factories have three requirements.
config in the container.Note: Don't worry, if your environment doesn't provide the requirements. You can always bootstrap a message bus by hand. Just look at the factories for inspiration in this case.
In the config folder of prooph/service-bus you will find example configuration files.
Configuration is a simple PHP array flavored with some comments to help you understand the structure.
Now follow the simple steps below to integrate prooph/service-bus in your framework and/or application.
config as the service id (common id for application config).src/Container to create the different message buses.
How you register a message bus depends on your container. Some containers like zend-servicemanager
or pimple-interop allow you to map a service id to an invokable factory.
If you use such an IoC container you are lucky. In this case you can use the prooph/service-bus factories as-is.
We recommend using Prooph\ServiceBus\<CommandBus/EventBus/QueryBus>::class as the service id.Note: If you're still unsure how to do it you might have a look at the BusFactoriesTest located in the tests folder.