You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
663 B
PHTML
31 lines
663 B
PHTML
2 years ago
|
<?php
|
||
|
|
||
|
namespace App\Contract;
|
||
|
|
||
|
interface SmsSender {
|
||
|
|
||
|
/**
|
||
|
* 发送短信验证码
|
||
|
*
|
||
|
* @param string $mobile 手机号
|
||
|
* @param string $code 验证码
|
||
|
* @param int $activeMinute 验证码有效期
|
||
|
*/
|
||
|
public function sendCode($mobile, $code, $activeMinute = 0);
|
||
|
|
||
|
/**
|
||
|
* 发送短信
|
||
|
*
|
||
|
* @param string $mobile 手机号
|
||
|
* @param string $content 短信内容
|
||
|
*/
|
||
|
public function send($mobile, $content);
|
||
|
|
||
|
/**
|
||
|
* 批量发送短信
|
||
|
*
|
||
|
* @param array $mobiles 手机号
|
||
|
* @param string $content 短信内容
|
||
|
*/
|
||
|
public function sendBatch(array $mobiles, $content);
|
||
|
}
|