Skip to content

Instantly share code, notes, and snippets.

@genkovich
Last active April 5, 2021 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genkovich/450cbe3d99b2e538331c58f357484b32 to your computer and use it in GitHub Desktop.
Save genkovich/450cbe3d99b2e538331c58f357484b32 to your computer and use it in GitHub Desktop.
<?php
class EmailConfirmation
{
public function __construct(
UserRepositoryInterface $userRepository,
TokenGeneraotorInterface $tokenGenerator,
MailerInterface $mailer
)
{
$this->userRepository = $userRepository;
$this->tokenGenerator = $tokenGenerator;
$this->mailer = $mailer;
}
public function execute(EmailConfirmCommand $confirmCommand) // DTO
{
// some logic
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment