Skip to content

Repository files navigation

getwarp/command-bus

Simple and extendable command bus

GitHubPackagistInstallationUsage

Installation

Via Composer

$ composer require getwarp/command-bus

Usage

useWarp\CommandBus\CommandBus;
useWarp\CommandBus\Mapping\MapByStaticList;
class MyCommand
{
}
class MyCommandHandler
{
publicfunctionhandle(MyCommand$command)
{
// Do your job to handle a command
}
}
$commandBus = newCommandBus(newMapByStaticList([
MyCommand::class => [MyCommandHandler::class, 'handle'],
]));
$commandBus->handle(newMyCommand());

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Report issues and send pull requests in the main Warp repository. Please see contributing guide and code of conduct for details.

Credits

License

The MIT License (MIT). Please see license file for more information.

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages