WpOrg\Requests
Iri::set_port()
Set the port. Returns true on success, false on failure (if there are any invalid characters).
Method of the class: Iri{}
No Hooks.
Return
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->set_port( $port );
- $port(string) (required)
- -
Iri::set_port() Iri::set port code WP 6.6.2
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; }