This commit is contained in:
2021-10-26 18:58:09 +08:00
parent b68403f581
commit 3d690d6d15
13 changed files with 352 additions and 258 deletions
-32
View File
@@ -1,32 +0,0 @@
<?php
namespace Kiri\Rpc;
class RpcManager
{
private static array $_handler = [];
/**
* @param $cmd
* @param array $handler
* @param string $protocol
*/
public static function addCmdHandler($cmd, array $handler, string $protocol)
{
static::$_handler[$cmd] = [$handler, $protocol];
}
/**
* @param $cmd
* @return array|null
*/
public static function getHandler($cmd): ?array
{
return static::$_handler[$cmd] ?? null;
}
}