WordPress\AiClientDependencies\Psr\Http\Message

UriInterface::withPortpublicWP 1.0

Return an instance with the specified port.

This method MUST retain the state of the current instance, and return an instance that contains the specified port.

Implementations MUST raise an exception for ports outside the established TCP and UDP port ranges.

A null value provided for the port is equivalent to removing the port information.

Метод класса: UriInterface{}

Хуков нет.

Возвращает

static. A new instance with the specified port.

Использование

$UriInterface = new UriInterface();
$UriInterface->withPort( ?int $port ): UriInterface;
?int $port(обязательный)
.

Код UriInterface::withPort() WP 7.0.4

public function withPort(?int $port): UriInterface;