class EditPostHandler

Traits

Properties

protected Dispatcher $events from DispatchEventsTrait
protected PostRepository $posts
protected PostValidator $validator

Methods

dispatchEventsFor(object $entity, User $actor = null)

<p>Dispatch all events for an entity.</p>

__construct(Dispatcher $events, PostRepository $posts, PostValidator $validator)

No description

handle(EditPost $command)

No description

Details

dispatchEventsFor(object $entity, User $actor = null)

<p>Dispatch all events for an entity.</p>

Parameters

object $entity
User $actor

__construct(Dispatcher $events, PostRepository $posts, PostValidator $validator)

Parameters

Dispatcher $events
PostRepository $posts
PostValidator $validator

Post handle(EditPost $command)

Parameters

EditPost $command

Return Value

Post

Exceptions

PermissionDeniedException