EventDispatchingDecorator
- Full name:
\Codefy\CommandBus\Decorators\EventDispatchingDecorator
- This class implements:
\Codefy\CommandBus\Decorator
Properties
dispatcher
innerCommandBus
Methods
__construct
public __construct(\Codefy\CommandBus\Decorators\EventDispatcher $dispatcher, ?\Codefy\CommandBus\CommandBus $innerCommandBus = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$dispatcher | \Codefy\CommandBus\Decorators\EventDispatcher | |
$innerCommandBus | ?\Codefy\CommandBus\CommandBus |
setInnerBus
Set the CommandBus which we're decorating.
Parameters:
Parameter | Type | Description |
---|---|---|
$bus | \Codefy\CommandBus\CommandBus |
execute
Execute a command and dispatch and event.
Parameters:
Parameter | Type | Description |
---|---|---|
$command | \Codefy\CommandBus\Command |
Throws:
getEventName
Get the event name for a given Command.
Parameters:
Parameter | Type | Description |
---|---|---|
$command | \Codefy\CommandBus\Command |
Automatically generated on 2025-10-13