2017 © Pedro Peláez
 

library cqrs

Helthe CQRS Component

image

helthe/cqrs

Helthe CQRS Component

  • Wednesday, September 17, 2014
  • by carlalexander
  • Repository
  • 1 Watchers
  • 3 Stars
  • 38 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Helthe CQRS Build Status Scrutinizer Code Quality

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)

Installation

Using Composer

Manually

Add the following in your composer.json:, (*3)

{
    "require": {
        // ...
        "helthe/cqrs": "dev-master"
    }
}

Using the command line

$ composer require 'helthe/cqrs=dev-master'

Usage

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);

Bugs

For bugs or feature requests, please create an issue., (*5)

The Versions

17/09 2014

dev-master

9999999-dev https://helthe.co

Helthe CQRS Component

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Carl Alexander

cqrs