final class ContentStreamCommandHandler implements CommandHandlerInterface (View source)

internal  from userland, you'll use ContentRepository::handle to dispatch commands
 

INTERNALS. Only to be used from WorkspaceCommandHandler!!!

Methods

bool
canHandle(CommandInterface $command)

No description

EventsToPublish
handle(CommandInterface $command, ContentRepository $contentRepository)

No description

void
requireContentStreamToNotExistYet(ContentStreamId $contentStreamId, ContentRepository $contentRepository)

No description

void
requireContentStreamToExist(ContentStreamId $contentStreamId, ContentRepository $contentRepository)

No description

Details

bool canHandle(CommandInterface $command)

No description

Parameters

CommandInterface $command

Return Value

bool

EventsToPublish handle(CommandInterface $command, ContentRepository $contentRepository)

No description

Parameters

CommandInterface $command
ContentRepository $contentRepository

Return Value

EventsToPublish

protected void requireContentStreamToNotExistYet(ContentStreamId $contentStreamId, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
ContentRepository $contentRepository

Return Value

void

Exceptions

ContentStreamAlreadyExists

protected void requireContentStreamToExist(ContentStreamId $contentStreamId, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
ContentRepository $contentRepository

Return Value

void

Exceptions

ContentStreamDoesNotExistYet