定制 horde/alarm 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

horde/alarm

Composer 安装命令:

composer require horde/alarm

包简介

Alarm library

README 文档

README

Modern alarm/notification system for PHP 8.1+.

Usage

use Horde\Alarm\AlarmConfig;
use Horde\Alarm\AlarmManager;
use Horde\Alarm\SqlStorage;
use Horde\Alarm\MailHandler;
use Horde\Alarm\NotificationMethod;

// Storage backend
$storage = new SqlStorage($db);
$storage->set(new AlarmConfig(
    id: 'meeting',
    user: 'john@example.com',
    start: new Horde_Date('2026-04-01 14:00'),
    methods: [NotificationMethod::Mail],
    title: 'Team Meeting'
));

// Alarm manager with handlers
$manager = new AlarmManager($storage);
$manager->addHandler(new MailHandler($identityFactory, $transport, $storage));
$manager->notify('john@example.com');

Features

  • Type-safe: Full PHP 8.1 strict types, enums, readonly properties
  • Modern: PSR-4 namespace, constructor promotion, value objects
  • Flexible: Multiple storage backends (memory, SQL) and notification methods
  • Tested: 142 tests, 217 assertions, full PHPUnit 11+ compatibility

Install

composer require horde/alarm

Documentation

  • doc/ALERTS.md - Alarm vs Notification vs Log subsystems
  • doc/TESTING.md - Test organization and running tests
  • doc/INTEGRATIONTEST.md - Running integration tests
  • doc/UPGRADING.md - Migration guide from lib/ 2.x PSR-0 to src/ 3.0 PSR-4

License

LGPL-2.1-only

统计信息

  • 总下载量: 3.56k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 5
  • 推荐数: 1

GitHub 信息

  • Stars: 1
  • Watchers: 5
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1-only
  • 更新时间: 2023-10-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固