interface CommandBusInterface

Command bus interface.

Methods

__construct(Container|null $container = null, Onion|null $onion = null)

Constructor.

mixed
dispatch(CommandInterface|string $command, array $parameters = [], array $middleware = [])

Dispatches the command to the command handler and returns the result.

Details

at line 26
__construct(Container|null $container = null, Onion|null $onion = null)

Constructor.

Parameters

Container|null $container Container
Onion|null $onion Onion

at line 36
mixed dispatch(CommandInterface|string $command, array $parameters = [], array $middleware = [])

Dispatches the command to the command handler and returns the result.

Parameters

CommandInterface|string $command Command
array $parameters Parameters
array $middleware Middleware

Return Value

mixed