Requests_IRI::set_port()
最后更新于:2021-11-26 03:59:57
Requests_IRI::set_port( string$port)Set the port. 响应s true on success, false on failure (if there are any invalid characters).
参数
- $port
-
(string) (Required)
响应
(bool)
源文件
文件: gc-includes/Requests/IRI.php
protected function set_port($port) {
if ($port === null) {
$this->port = null;
return true;
}
if (strspn($port, '0123456789') === strlen($port)) {
$this->port = (int) $port;
$this->scheme_normalization();
return true;
}
$this->port = null;
return false;
}