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
@@ -0,0 +1,41 @@
<?php
namespace app\flow\strategies;
use app\flow\ProcessContext;
use app\flow\nodes\ProcessNodeInterface;
/**
* 流程策略接口
* 策略模式的核心接口
*/
interface ProcessStrategyInterface
{
/**
* 执行策略
* @param ProcessContext $context 流程上下文
* @param ProcessNodeInterface $node 当前节点
* @return ProcessContext 处理后的上下文
*/
public function execute(ProcessContext $context, ProcessNodeInterface $node): ProcessContext;
/**
* 获取策略名称
* @return string
*/
public function getName(): string;
/**
* 获取策略执行阶段
* @return string 'before' | 'after'
*/
public function getPhase(): string;
/**
* 判断策略是否适用
* @param ProcessContext $context
* @param ProcessNodeInterface $node
* @return bool
*/
public function isApplicable(ProcessContext $context, ProcessNodeInterface $node): bool;
}