class EmailBroker implements EmailBrokerInterface

이 클래스는 Xpressengine에서 이메일 인증 처리를 수행하는 클래스이다.

Properties

protected Mailer $mailer 이메일 전송기
private UserHandler $handler

Methods

__construct(UserHandler $handler, Mailer $mailer)

생성자.

void
sendEmailForRegister(EmailInterface $mail, string $token, string $view, null|Closure $callback = null)

회원가입시 이메일 인증을 위한 이메일을 전송한다.

void
sendEmailForAddingEmail(EmailInterface $mail, string $view, null|Closure $callback = null)

기존 회원이 이메일 추가시 이메일 인증을 위한 이메일을 전송한다.

bool
validateConfirmCode(EmailInterface $mail, string $code)

주어진 이메일의 인증코드를 검사한다.

bool
confirmEmail(EmailInterface $email, string $code)

이메일을 인증처리 한다.

Details

at line 52
__construct(UserHandler $handler, Mailer $mailer)

생성자.

Parameters

UserHandler $handler handler
Mailer $mailer mail sender

at line 70
void sendEmailForRegister(EmailInterface $mail, string $token, string $view, null|Closure $callback = null)

회원가입시 이메일 인증을 위한 이메일을 전송한다.

Parameters

EmailInterface $mail 전송할 이메일 정보
string $token 회원가입 토큰 id
string $view 이메일 전송시 사용할 템플릿
null|Closure $callback 이메일 전송할 때 처리할 로직

Return Value

void

at line 94
void sendEmailForAddingEmail(EmailInterface $mail, string $view, null|Closure $callback = null)

기존 회원이 이메일 추가시 이메일 인증을 위한 이메일을 전송한다.

Parameters

EmailInterface $mail 전송할 이메일 정보
string $view 이메일 전송시 사용할 템플릿
null|Closure $callback 이메일 전송할 때 처리할 로직

Return Value

void

at line 118
bool validateConfirmCode(EmailInterface $mail, string $code)

주어진 이메일의 인증코드를 검사한다.

Parameters

EmailInterface $mail 인증할 이메일 정보
string $code 인증코드

Return Value

bool 주어진 이메일에 등록된 인증코드가 일치할 경우 true, 일치하지 않으면 false를 반환한다.

at line 134
bool confirmEmail(EmailInterface $email, string $code)

이메일을 인증처리 한다.

Parameters

EmailInterface $email 인증할 이메일
string $code 인증코드

Return Value

bool 주어진 이메일의 인증처리가 성공하면 true를 반환한다.