Skip to content

Odin

The main Odin class is a CommandBus, which is effectively a decorator around another CommandBus interface.

Properties

bus

protected ?\Codefy\CommandBus\CommandBus $bus

Methods

__construct

Constructor

public __construct(?\Codefy\CommandBus\CommandBus $bus = null, array $decorators = []): mixed

Parameters:

Parameter Type Description
$bus ?\Codefy\CommandBus\CommandBus
$decorators array Array of \Codefy\CommandBus\Decorator objects

pushDecorator

Push a new Decorator on to the stack.

public pushDecorator(\Codefy\CommandBus\Decorator $decorator): void

Parameters:

Parameter Type Description
$decorator \Codefy\CommandBus\Decorator

execute

Execute a command.

public execute(\Codefy\CommandBus\Command $command): mixed

Parameters:

Parameter Type Description
$command \Codefy\CommandBus\Command

Throws:



Automatically generated on 2025-10-13