From 7a3299cb10284179c3936b3aa04b0c728a011d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 2 Mar 2022 16:45:12 +0800 Subject: [PATCH] modify plugin name --- RpcManager.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/RpcManager.php b/RpcManager.php index 3f871ed..8fc3b3f 100644 --- a/RpcManager.php +++ b/RpcManager.php @@ -87,7 +87,7 @@ class RpcManager extends Component public function add(string $name, string $class, array $serviceConfig): bool { if (!isset($this->_rpc[$name])) { - $this->_rpc[$name] = ['methods' => [], 'id' => $serviceConfig['ID'], 'config' => $serviceConfig]; + $this->_rpc[$name] = ['id' => $serviceConfig['ID'], 'config' => $serviceConfig]; } Router::addServer('rpc', static function () use ($name, $class) { Router::get($name, $class); @@ -123,15 +123,4 @@ class RpcManager extends Component } } - - /** - * @param string $name - * @param string $method - * @return mixed - */ - public function get(string $name, string $method): array - { - return $this->_rpc[$name]['methods'][$method] ?? [null, null]; - } - }