PHPackages                             smoothphp/commandbus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. smoothphp/commandbus

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

smoothphp/commandbus
====================

Smooth Php Command Bus

v5.0.0(9y ago)248MITPHPPHP &gt;=5.5.0

Since Oct 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/SmoothPhp/CommandBus)[ Packagist](https://packagist.org/packages/smoothphp/commandbus)[ Docs](https://github.com/smoothphp/CommandBus)[ RSS](/packages/smoothphp-commandbus/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (20)Used By (0)

Command Bus
===========

[](#command-bus)

The command bus exists to execute write-or-fail commands within the domain of the application.

The command bus exists of 4 components.

- 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

[](#examples)

```
