Files
wordpress-theme-aksrt/src/AKSRT/Sms/ProviderInterface.php
T
kate522 aaf458af1c refactor(autoload): migrate theme classes to Composer PSR-4
Move 288 types from global AKSRT_* + inc/classes manual requires into
namespace AKSRT\{Domain} under src/AKSRT/, wire composer.json psr-4,
and slim bootstrap to helpers/modules/hooks only. Split multi-class
widget/gateway files, update admin contract audit paths, and document
the layout in ADR/README.
2026-07-17 13:29:22 +08:00

48 lines
1.1 KiB
PHP

<?php
/**
* @package AKSRT
*/
namespace AKSRT\Sms;
defined('ABSPATH') || exit;
interface ProviderInterface {
/**
* 供应商唯一标识
*/
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;
}