dev-master
9999999-dev https://helthe.coHelthe CQRS Component
MIT
The Requires
- php >=5.3.3
by Carl Alexander
cqrs
Helthe CQRS Component
Helthe CQRS is a small library implementing command-query separation. It's based on the refactored version of LiteCQRS and the work of Mark Nijhof for his CQRS book., (*1)
Currently, the library only implements command handling using a command bus for communication., (*2)
Add the following in your composer.json
:, (*3)
{ "require": { // ... "helthe/cqrs": "dev-master" } }
$ composer require 'helthe/cqrs=dev-master'
The component contains mainly helper interfaces for implementing CQRS. Some basic implementations are also included., (*4)
use Helthe\Component\CQRS\Bus\SequentialCommandBus; use Helthe\Component\CQRS\Command\CommandInterface; use Helthe\Component\CQRS\CommandHandler\CommandHandlerInterface; use Helthe\Component\CQRS\CommandHandler\MemoryCommandHandlerLocator; /* @var CommandInterface */ $command = new Command() /* @var CommandHandlerInterface */ $handler = new CommandHandler() $locator = new MemoryCommandHandlerLocator(); $locator->register(get_class($command), $handler); $bus = new SequentialCommandBus($locator); $bus->dispatch($command);
For bugs or feature requests, please create an issue., (*5)
Helthe CQRS Component
MIT
cqrs