wpbridge/includes/Notification/HandlerInterface.php
feibisi 16c121aba7 feat: WPBridge v0.3.0 - AI 桥接层 + 源分组 + 商业插件支持
源分组管理:
- GroupModel: 源分组数据模型
- GroupManager: 分组 CRUD、批量管理、共享认证

AI 桥接层:
- AIGateway: pre_http_request 拦截器
- 支持透传模式和 WPMind 集成
- 用户可配置白名单
- AdapterInterface: 适配器接口
- YoastAdapter: Yoast SEO Premium AI 适配
- RankMathAdapter: Rank Math Content AI 适配

商业插件支持:
- CommercialManager: 商业插件检测和管理
- 版本锁定功能
- EDD/WooCommerce Licensing 检测
- 更新源覆盖逻辑

通知系统:
- NotificationManager: 统一通知管理
- EmailHandler: 邮件通知(HTML 模板)
- WebhookHandler: Webhook 通知
  - 支持 Slack/Discord/Teams 格式
  - HMAC 签名验证

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:05:30 +08:00

51 lines
925 B
PHP

<?php
/**
* 通知处理器接口
*
* @package WPBridge
*/
namespace WPBridge\Notification;
// 防止直接访问
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* 通知处理器接口
*/
interface HandlerInterface {
/**
* 发送通知
*
* @param string $subject 主题
* @param string $message 消息
* @param array $data 附加数据
* @throws \Exception 发送失败时抛出异常
*/
public function send( string $subject, string $message, array $data = [] ): void;
/**
* 是否启用
*
* @return bool
*/
public function is_enabled(): bool;
/**
* 是否支持该通知类型
*
* @param string $type 通知类型
* @return bool
*/
public function supports_type( string $type ): bool;
/**
* 获取处理器名称
*
* @return string
*/
public function get_name(): string;
}