Documentation

CommandBus
in package

Receives a command and sends it through a chain of middleware for processing.

Tags
final

Table of Contents

Properties

$middlewareChain  : callable

Methods

__construct()  : mixed
handle()  : mixed
Executes the given command and optionally returns a value
createExecutionChain()  : callable

Properties

$middlewareChain

private callable $middlewareChain

Methods

handle()

Executes the given command and optionally returns a value

public handle(object $command) : mixed
Parameters
$command : object

createExecutionChain()

private createExecutionChain(array<string|int, Middleware$middlewareList) : callable
Parameters
$middlewareList : array<string|int, Middleware>
Return values
callable

        
On this page

Search results