Files
wordpress-theme-aksrt/inc/classes/sms/class-aksrt-sms-provider.php
T
kate522 ce1c13b947 refactor(classes): organize inc/classes into domain folders
Move ~94 root class shells and root *-traits into domain directories
(core, auth, user, credits, content, payment/gateways, forum, shop,
sms, ai, messages, extensions, widgets, settings, admin). Update
bootstrap require paths, co-locate traits with owners, fix forum/user
relative requires, drop duplicate shop controller requires, and wire
home-modules load. Path-only; class names and init order unchanged.
2026-07-17 11:11:57 +08:00

50 lines
1.2 KiB
PHP

<?php
/**
* AKSRT SMS Provider Interface
*
* 统一短信供应商接口。所有 SMS adapter 必须实现此接口。
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
interface AKSRT_SMS_Provider {
/**
* 供应商唯一标识
*/
public function get_key(): string;
/**
* 供应商显示名称
*/
public function get_label(): string;
/**
* 校验配置完整性,返回缺失字段列表
*
* @param array $config SMS 配置
* @return array 缺失的字段名列表,空数组表示配置完整
*/
public function validate_config(array $config): array;
/**
* 发送短信验证码
*
* @param string $phone 手机号
* @param string $code 验证码
* @param array $config SMS 配置
* @return array{success: bool, message: string, transport?: string}
*/
public function send_code(string $phone, string $code, array $config): array;
/**
* 获取供应商运行时状态
*
* @param array $config SMS 配置
* @return array{configured: bool, available: bool, verified: bool, transport: string, missing_fields: array}
*/
public function get_status(array $config): array;
}