From d2ec972c692115bdfca4ab5a5270beacbb958700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 2 Dec 2021 14:13:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/RpcManager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/RpcManager.php b/src/RpcManager.php index 1d518ab..0c86e84 100644 --- a/src/RpcManager.php +++ b/src/RpcManager.php @@ -28,7 +28,9 @@ class RpcManager $methods = Kiri::getDi()->getReflect($class); $lists = $methods->getMethods(\ReflectionMethod::IS_PUBLIC); - if (!isset($this->_rpc[$name])) $this->_rpc[$name] = ['methods' => [], 'id' => $serviceConfig['ID'], 'config' => $serviceConfig]; + if (!isset($this->_rpc[$name])) { + $this->_rpc[$name] = ['methods' => [], 'id' => $serviceConfig['ID'], 'config' => $serviceConfig]; + } foreach ($lists as $reflection) { $methodName = $reflection->getName(); @@ -59,6 +61,7 @@ class RpcManager { $agent = Kiri::getDi()->get(Agent::class); foreach ($this->_rpc as $list) { + var_dump($list); $data = $agent->service->register($list['config']); if ($data->getStatusCode() != 200) { exit($data->getBody()->getContents());