文档工具更改为私有地址

This commit is contained in:
候学杰 2019-01-30 12:56:40 +08:00
parent 8477c76407
commit dd5656e363
3 changed files with 25 additions and 21 deletions

View File

@ -15,5 +15,9 @@
}
},
"require-dev": {
},
"api-doc-php": {
"type": "vcs",
"url": "git@git.int.haowumc.com:composer/php-rpc-doc.git"
}
}

View File

@ -97,7 +97,7 @@ class Client
$headers = [
'X-Client-App' => $this->config['app'],
];
app('rpc.logger')->info("client_request",array_merge($this->server_config, $payload));
app('rpc.logger')->info("client_request", array_merge($this->server_config, $payload));
$resp = $this->http->request('POST', 'rpc/json-rpc-v2.json', [
'headers' => $headers,
'json' => $payload,
@ -108,7 +108,7 @@ class Client
try {
$body = \GuzzleHttp\json_decode($resp->getBody(), true);
app('rpc.logger')->info("client_response",$body);
app('rpc.logger')->info("client_response", $body);
if (empty($body)) {
throw new RpcServerException('http response empty', 500);
}
@ -120,7 +120,7 @@ class Client
return $body['result'];
} catch (\InvalidArgumentException $e) {
app('rpc.logger')->error('client_decode_error',array_merge($this->server_config, $payload));
app('rpc.logger')->error('client_decode_error', array_merge($this->server_config, $payload));
throw new RpcServerException('json decode error', -32700);
}
}

View File

@ -84,24 +84,24 @@ class JsonRpcServer extends JsonRpcBase
* @param string $method 参数名称
* @return array 返回结果
*/
protected function parseMethod($method)
{
$method = explode('.', $method);
if (count($method) < 2) {
return ['', ''];
}
$function = array_pop($method);
$class = 'Rpc' . ucwords(array_pop($method));
foreach ($method as $one) {
$class = ucwords($one) . '\\' . $class;
}
$class = "App\Rpc\\$class";
return [$class, $function];
}
// protected function parseMethod($method)
// {
// $method = explode('.', $method);
//
// if (count($method) < 2) {
// return ['', ''];
// }
//
// $function = array_pop($method);
// $class = 'Rpc' . ucwords(array_pop($method));
//
// foreach ($method as $one) {
// $class = ucwords($one) . '\\' . $class;
// }
//
// $class = "App\Rpc\\$class";
// return [$class, $function];
// }
protected function isEnoughParameter($class, $method, $parameters)