class UploadAvatarHandler

Traits

Properties

protected Dispatcher $events from DispatchEventsTrait
protected UserRepository $users
protected AvatarUploader $uploader
protected AvatarValidator $validator
protected ImageManager $imageManager

Methods

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

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

__construct(Dispatcher $events, UserRepository $users, AvatarUploader $uploader, AvatarValidator $validator, ImageManager $imageManager)

No description

handle(UploadAvatar $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, UserRepository $users, AvatarUploader $uploader, AvatarValidator $validator, ImageManager $imageManager)

Parameters

Dispatcher $events
UserRepository $users
AvatarUploader $uploader
AvatarValidator $validator
ImageManager $imageManager

User handle(UploadAvatar $command)

Parameters

UploadAvatar $command

Return Value

User

Exceptions

PermissionDeniedException
ValidationException