From 1189ab7b0c9d388c82e38b1abdcd64c4e713008f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 2 Dec 2021 15:40:45 +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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/RpcManager.php b/src/RpcManager.php index d6dad84..325c8a8 100644 --- a/src/RpcManager.php +++ b/src/RpcManager.php @@ -31,12 +31,11 @@ class RpcManager } $body = json_decode($lists->getBody(), true); - $file = storage('.rpc.clients.' . md5($serviceName),'rpc'); + $file = storage('.rpc.clients.' . md5($serviceName), 'rpc'); if (!empty($body) && is_array($body)) { + var_dump($body, array_column($body, 'Service')); - var_dump(array_column($body, 'service')); - - file_put_contents($file, json_encode(array_column($body, 'service'))); + file_put_contents($file, json_encode(array_column($body, 'Service'))); } else { file_put_contents($file, json_encode([])); } @@ -62,7 +61,7 @@ class RpcManager */ public function getServices($serviceName): array { - $file = storage('.rpc.clients.' . md5($serviceName),'rpc'); + $file = storage('.rpc.clients.' . md5($serviceName), 'rpc'); if (!file_exists($file)) { return []; }