container->has(HttpClientInterface::class)) { if (($http = $this->container->get(HttpClientInterface::class)) instanceof ClientInterface) { return $http; } throw new InvalidParamsException(Exception::PARAMS_HTTP_CLIENT_INVALID, '参数异常: `HttpClient` 不符合 PSR 规范'); } return new Client($options); } }