add clear

This commit is contained in:
2021-04-06 15:20:39 +08:00
parent 80abb3a20a
commit bdafc011a6
23 changed files with 220 additions and 220 deletions
+7 -7
View File
@@ -328,35 +328,35 @@ class HttpClient
}
/**
* @param string $_string
* @param $_string
* @return bool|string
* @throws Exception
*/
private function matchHost($_string = '')
private function matchHost($_= '')
{
if (empty($_string)) {
return false;
}
if ($this->isHttp($_string)) {
$_string = str_replace('http://', '', $_string);
$_= str_replace('http://', '', $_string);
$hostAndUrls = explode('/', $_string);
$this->host = array_shift($hostAndUrls);
$_string = implode('/', $hostAndUrls);
$_= implode('/', $hostAndUrls);
} else if ($this->isHttps($_string)) {
$_string = str_replace('https://', '', $_string);
$_= str_replace('https://', '', $_string);
$this->setIsSSL(true);
$hostAndUrls = explode('/', $_string);
$this->host = array_shift($hostAndUrls);
$_string = implode('/', $hostAndUrls);
$_= implode('/', $hostAndUrls);
} else if (empty($this->host)) {
$hostAndUrls = explode('/', $_string);
$this->host = array_shift($hostAndUrls);
$_string = implode('/', $hostAndUrls);
$_= implode('/', $hostAndUrls);
}
if (strpos($this->host, ':') !== false) {