Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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