# A classe Uri\WhatWg\Url

(PHP 8 >= 8.5.0)

## Introdução

## Resumo da classe

namespace Uri\WhatWg;
final readonly class Url {
/* Métodos */
public function __construct(string `$uri`, ?Uri\WhatWg\Url `$baseUrl` = `null`, array `&$softErrors` = `null`)
public function __debugInfo(): array
public function equals(Uri\WhatWg\Url `$url`, Uri\UriComparisonMode `$comparisonMode` = `Uri\UriComparisonMode::ExcludeFragment`): bool
public function getAsciiHost(): ?string
public function getFragment(): ?string
public function getPassword(): ?string
public function getPath(): string
public function getPort(): ?int
public function getQuery(): ?string
public function getScheme(): string
public function getUnicodeHost(): ?string
public function getUsername(): ?string
public static function parse(string `$uri`, ?Uri\WhatWg\Url `$baseUrl` = `null`, array `&$errors` = `null`): ?static
public function resolve(string `$uri`, array `&$softErrors` = `null`): static
public function __serialize(): array
public function toAsciiString(): string
public function toUnicodeString(): string
public function __unserialize(array `$data`): void
public function withFragment(?string `$fragment`): static
public function withHost(?string `$host`): static
public function withPassword(#[\SensitiveParameter]?string `$password`): static
public function withPath(string `$path`): static
public function withPort(?int `$port`): static
public function withQuery(?string `$query`): static
public function withScheme(string `$scheme`): static
public function withUsername(?string `$username`): static
}

## Índice

- Uri\WhatWg\Url::__construct — Constrói o objeto Url
- Uri\WhatWg\Url::__debugInfo — Retorna o estado interno da URL
- Uri\WhatWg\Url::equals — Verifica se duas URLs são equivalentes
- Uri\WhatWg\Url::getAsciiHost — Obtém o componente host como uma string ASCII
- Uri\WhatWg\Url::getFragment — Obtém o componente fragment
- Uri\WhatWg\Url::getPassword — Obtém o componente password
- Uri\WhatWg\Url::getPath — Obtém o componente path
- Uri\WhatWg\Url::getPort — Obtém o componente port
- Uri\WhatWg\Url::getQuery — Obtém o componente de consulta
- Uri\WhatWg\Url::getScheme — Obtém o componente scheme
- Uri\WhatWg\Url::getUnicodeHost — Obtém o componente host como uma string Unicode
- Uri\WhatWg\Url::getUsername — Obtém o componente username
- Uri\WhatWg\Url::parse — Analisa uma URL
- Uri\WhatWg\Url::resolve — Resolve uma URL com o objeto atual como URL base
- Uri\WhatWg\Url::__serialize — Serializa o objeto Url
- Uri\WhatWg\Url::toAsciiString — Recompõe a URL como uma string ASCII
- Uri\WhatWg\Url::toUnicodeString — Recompõe a URL como uma string Unicode
- Uri\WhatWg\Url::__unserialize — Desserializa o parâmetro data em um objeto Url
- Uri\WhatWg\Url::withFragment — Modifica o componente fragment
- Uri\WhatWg\Url::withHost — Modifica o componente host
- Uri\WhatWg\Url::withPassword — Modifica o componente password
- Uri\WhatWg\Url::withPath — Modifica o componente path
- Uri\WhatWg\Url::withPort — Modifica o componente port
- Uri\WhatWg\Url::withQuery — Modifica o componente query
- Uri\WhatWg\Url::withScheme — Modifica o componente scheme
- Uri\WhatWg\Url::withUsername — Modifica o componente username

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open