WpOrg\Requests
Iri::set_port
Set the port. Returns true on success, false on failure (if there are any invalid characters).
Метод класса: Iri{}
Хуков нет.
Возвращает
bool.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->set_port( $port );
- $port(строка) (обязательный)
- .
Код Iri::set_port() Iri::set port WP 7.1.3
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;
}