WordPress\AiClientDependencies\Nyholm\Psr7
Uri::withHost
Метод класса: Uri{}
Хуков нет.
Возвращает
static.
Использование
$Uri = new Uri(); $Uri->withHost( $host ): UriInterface;
- $host(обязательный)
- .
Код Uri::withHost() Uri::withHost WP 7.1.2
public function withHost($host): UriInterface
{
if (!\is_string($host)) {
throw new \InvalidArgumentException('Host must be a string');
}
if ($this->host === $host = \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')) {
return $this;
}
$new = clone $this;
$new->host = $host;
return $new;
}