Files
huangjingfen/pro_v3.5.1/crmeb/basic/BaseSmss.php
panchengyong c1e74d8e68 chore(php): 统一 ScottPan 文件头与注释域名替换
- 按 docs/renew-code-comment.md 将 PHP 文件头改为带边框的 Author 注释\n- 注释中的 crmeb.com 替换为 uj345.cn(代码字符串中的外链未改)\n- 新增 docs/renew-code-comment.md 说明

Made-with: Cursor
2026-03-29 11:22:58 +08:00

102 lines
2.2 KiB
PHP

<?php
// +----------------------------------------------------------------------
// | Author: ScottPan Team
// +----------------------------------------------------------------------
namespace crmeb\basic;
use crmeb\services\AccessTokenServeService;
/**
* Class BaseSmss
* @package crmeb\basic
*/
abstract class BaseSmss extends BaseStorage
{
/**
* access_token
* @var null
*/
protected $accessToken = NULL;
/**
* BaseSmss constructor.
* @param string $name
* @param AccessTokenServeService $accessTokenServeService
* @param string $configFile
*/
public function __construct(string $name, AccessTokenServeService $accessTokenServeService, string $configFile, array $config = [])
{
$this->accessToken = $accessTokenServeService;
$this->name = $name;
$this->configFile = $configFile;
$this->initialize($config);
}
/**
* 初始化
* @param array $config
* @return mixed|void
*/
protected function initialize(array $config = [])
{
}
/**
* 开通服务
* @return mixed
*/
abstract public function open();
/**修改签名
* @return mixed
*/
abstract public function modify(string $sign = null, string $phone, string $code);
/**用户信息
* @return mixed
*/
abstract public function info();
/**发送短信
* @return mixed
*/
abstract public function send(string $phone, string $templateId, array $data);
/**
* 短信模板
* @param int $page
* @param int $limit
* @param int $type
* @return mixed
*/
abstract public function temps(int $page, int $limit, int $type);
/**
* 申请模板
* @param string $title
* @param string $content
* @param int $type
* @return mixed
*/
abstract public function apply(string $title, string $content, int $type);
/**
* 模板记录
* @param int $tempType
* @param int $page
* @param int $limit
* @return mixed
*/
abstract public function applys(int $tempType, int $page, int $limit);
/**发送记录
* @return mixed
*/
abstract public function record($record_id);
}