final class CommandHooks implements CommandHookInterface, IteratorAggregate, Countable (View source)

Collection of {CommandHookInterface} instances, functioning as a delegating command hook implementation

Methods

static CommandHooks
fromArray(array $commandHooks)

No description

static CommandHooks
createEmpty()

No description

getIterator()

No description

int
count()

No description

onAfterHandle(CommandInterface $command, PublishedEvents $events)

No description

Details

static CommandHooks fromArray(array $commandHooks)

No description

Parameters

array $commandHooks

Return Value

CommandHooks

static CommandHooks createEmpty()

No description

Return Value

CommandHooks

Traversable getIterator()

No description

Return Value

Traversable

int count()

No description

Return Value

int

CommandInterface onBeforeHandle(CommandInterface $command)

No description

Parameters

CommandInterface $command

The command that is about to be handled

Return Value

CommandInterface

This hook must return a command instance. It can be the unaltered incoming $command or a new instance

Commands onAfterHandle(CommandInterface $command, PublishedEvents $events)

No description

Parameters

CommandInterface $command

The command that was just handled

PublishedEvents $events

The events that resulted from the handled command

Return Value

Commands

This hook must return Commands that will be handled after the incoming $command. The Commands can be empty.