/** * delete * * @param EmailInterface $email email * * @return bool|null * @throws CannotDeleteMainEmailOfUserException */ public function delete(EmailInterface $email) { $user = $email->user; if ($user->email === $email->getAddress()) { throw new CannotDeleteMainEmailOfUserException(); } return $email->delete(); }
/** * 이메일을 삭제한다 * * @param EmailInterface $email email * * @return bool */ public function deleteEmail(EmailInterface $email) { if ($email->isConfirmed()) { return $this->emails()->delete($email); } else { return $this->pendingEmails()->delete($email); } }
/** * delete * * @param EmailInterface $email email * * @return mixed * @throws CannotDeleteMainEmailOfUserException */ public function delete(EmailInterface $email) { return $email->delete(); }
/** * 주어진 이메일의 인증코드를 검사한다. * * @param EmailInterface $mail 인증할 이메일 정보 * @param string $code 인증코드 * * @return bool 주어진 이메일에 등록된 인증코드가 일치할 경우 true, 일치하지 않으면 false를 반환한다. */ protected function validateConfirmCode(EmailInterface $mail, $code) { return $mail->getConfirmationCode() === $code; }