Files
codefever/application/libraries/service/MessageService/Email/EmailTemplate.php

18 lines
459 B
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace service\MessageService\Email;
use service\Exception\Exception;
class EmailTemplate {
const emailCodeTemplate = '【CodeFever Community】您好本次的邮箱验证码是 %s , 验证码五分钟内有效, 请及时填写。';
public static function compose (string $code) {
if (!self::emailCodeTemplate) {
throw new Exception(1000);
}
return sprintf(self::emailCodeTemplate, $code);
}
}