2017 © Pedro Peláez
 

library command-bus

Command Bus library

image

innmind/command-bus

Command Bus library

  • Sunday, February 25, 2018
  • by Baptouuuu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 270 Installations
  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 55 % Grown

The README.md

CommandBus

Build Status codecov Type Coverage, (*1)

Simple library to route a command to its handler, the interface allows you to compose buses to add capabilities. Each handler must be a callable., (*2)

Installation

composer require innmind/command-bus

Example

use function Innmind\CommandBus\bootstrap;
use Innmind\Immutable\Map;

class MyCommand {}

$echo = function(MyCommand $command) {
    echo 'foo';
};

$handle = bootstrap()['bus'](
    Map::of('string', 'callable')
        (MyCommand::class, $echo)
);

$handle(new MyCommand); //prints 'foo' and return null;

The Versions

12/10 2017
19/02 2017
21/01 2017
17/12 2016
17/12 2016

1.1.0

1.1.0.0 http://github.com/Innmind/CommandBus

Command Bus library

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus ddd

20/07 2016

1.0.0

1.0.0.0 http://github.com/Innmind/CommandBus

Command Bus library

  Sources   Download

MIT

The Requires

 

command bus ddd