2017 © Pedro Peláez
 

library commandbus

Smooth Php Command Bus

image

smoothphp/commandbus

Smooth Php Command Bus

  • Tuesday, October 4, 2016
  • by mrsimonbennett
  • Repository
  • 2 Watchers
  • 1 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 20 Versions
  • 0 % Grown

The README.md

Command Bus

The command bus exists to execute write-or-fail commands within the domain of the application., (*1)

The command bus exists of 4 components., (*2)

  • Command
    The DTO containing the intent and data to execute the command.
  • Command Translator
    Takes a command, and translates to the command handler class name.
  • Handler Resolver
    Resolves (generates) the object that executes the given command
  • Middleware
    Sits between CommandBus::execute() and the execution of the command. Similar to HTTP middleware.

Examples

<?php  

// Define as many middlewares as you like,
// the given one uses the simple translator and resolver to  
// generate the command handler
$middleware = [
    new SmoothPhp\CommandBus\CommandHandlerMiddleware(
        new SmoothPhp\CommandBus\SimpleCommandTranslator,
        new SmoothPhp\CommandBus\SimpleCommandHandlerResolver
    )
];  

// Create the bus with the middle ware
$bus = new SmoothPhp\CommandBus\CommandBus($middleware);  

// Create the command
$command = new SignUpToNewsletter($memberId, $newsletterId);  

// Send to command bus
$bus->execute($command);

The Versions

04/10 2016

dev-master

9999999-dev https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

04/10 2016

v3.0.1

3.0.1.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

04/10 2016

v3.1.0

3.1.0.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

04/10 2016

v4.0.0

4.0.0.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

04/10 2016

v4.0.1

4.0.1.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

04/10 2016

v5.0.0

5.0.0.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

07/04 2016

v2.0.0

2.0.0.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

07/04 2016

v3.0.0

3.0.0.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

26/11 2015

v1.1.4

1.1.4.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

26/11 2015

v1.1.6

1.1.6.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

26/11 2015

v1.1.7

1.1.7.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

26/11 2015

v1.1.8

1.1.8.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

18/11 2015

v1.1.1

1.1.1.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

18/11 2015

v1.1.2

1.1.2.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

18/11 2015

v1.1.3

1.1.3.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

16/10 2015

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

16/10 2015

v0.1.0

0.1.0.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

16/10 2015

v1.0.3

1.0.3.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

16/10 2015

v1.0.4

1.0.4.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php

16/10 2015

v1.1.0

1.1.0.0 https://github.com/smoothphp/CommandBus

Smooth Php Command Bus

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus smooth php