library messagebus
Lean PHP Messagebus
lean-stack/messagebus
Lean PHP Messagebus
- Thursday, July 6, 2017
- by lean-stack
- Repository
- 1 Watchers
- 0 Stars
- 9 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Lean PHP Messagebus
A Lean PHP Messagebus (just a demo for my trainings), (*1)
CommandBus Design
Middleware
- A Middleware is any class implementing the interface
- A Middleware is invokeable
- A Middleware operates on a message and delegates to the next Middleware
Command
- A command can be any object
CommandBus
- The CommandBus handles a command via its handle method and returns nothing (void)
- The CommandBus is constructed with an array of ordered Middlewares
- The CommandBus ensures all middlewares are called
CommandHandler
- A CommandHandler can be any callable
- The CommandHandler accepts the command
CommandHandlerMiddleware
- The CommandhandlerMiddleware makes the CommandBus
- The CommandHandlerMiddleware delegates a command to its handler
- The CommandHandler uses a HandlerResolver to determine the handler for a given command
HandlerResolver
- A HandlerResolver is any class implementing the interface
- A HandlerResolver determines the command handler for a given command
CommandNameResolver
- A CommandNameResolver is any class implementing the interface
- A CommandName determines the name of a given command
dev-master
9999999-dev
Lean PHP Messagebus
Sources
Download
MIT
The Requires
The Development Requires
by
Micha Alt