Download the PHP package psamatt/service-bus-lite-bundle without Composer
On this page you can find all versions of the php package psamatt/service-bus-lite-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download psamatt/service-bus-lite-bundle
More information about psamatt/service-bus-lite-bundle
Files in psamatt/service-bus-lite-bundle
Package service-bus-lite-bundle
Short Description ServiceBus bundle implementation in Symfomy2
License MIT
Homepage http://github.com/psamatt/ServiceBusLiteBundle
Informations about the package service-bus-lite-bundle
Service Bus Bundle
Bundle that integrates Service Bus into Symfony2 through a bundle.
Installation using Composer
This bundle can be installed using composer by adding the following in the require
section of your composer.json
file:
Then, enable the bundle in the AppKernel:
How to use
Create Query or Command Handlers that implement ServiceBus\IQueryHandler
or ServiceBus\ICommandHandler
respectively such as:
Then register the Handler as a service, tagged as a ServiceBus Handler in services.yml:
Tagging this service as a command or query handler will allow the service bus to register this class as an awaiting handler for an upcoming command.
Now all you have to do is initialise a FooCommand within your Controller and send to the ServiceBus
In the background, the ServiceBus will find the associated Handler where you would code the logic required for that specific action.
Further code example can be found in the example folder of the main repository
Note: It is important that your Command
and your CommandHandler
classes have Command and CommandHandler appended to the Class name for the ServiceBus to find the related CommandHandler for a raised Command.
All versions of service-bus-lite-bundle with dependencies
symfony/framework-bundle Version 2.*
psamatt/service-bus-lite Version 1.*