feat: 实现TCP Server

This commit is contained in:
zimoyin
2026-03-02 21:59:43 +08:00
parent 043306819b
commit a79dfae57d
144 changed files with 15785 additions and 140 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace app\flow\config;
enum MorningMode
{
case None;
case All;
case StorageTime;
case DailyFirst;
case SpecificTypes;
/**
* 从 snake_case 字符串创建(兼容旧数组配置)
* 例如 'none' => None, 'storage_time' => StorageTime, 'daily_first' => DailyFirst
*/
public static function from_name(string $name): ?self
{
return match (strtolower($name)) {
'none' => self::None,
'all' => self::All,
'storage_time' => self::StorageTime,
'daily_first' => self::DailyFirst,
'specific_types' => self::SpecificTypes,
default => null,
};
}
}