WordPress\AiClientDependencies\Nyholm\Psr7

Uri::withPortpublicWP 1.0

Method of the class: Uri{}

No Hooks.

Returns

static.

Usage

$Uri = new Uri();
$Uri->withPort( $port ): UriInterface;
$port(required)
.

Uri::withPort() code WP 7.0

public function withPort($port): UriInterface
{
    if ($this->port === $port = $this->filterPort($port)) {
        return $this;
    }
    $new = clone $this;
    $new->port = $port;
    return $new;
}