Skip to content

Files

Latest commit

 

History

History
218 lines (155 loc) · 3.7 KB

File metadata and controls

218 lines (155 loc) · 3.7 KB

URL

  • class URL (php\net\URL)
  • package std
  • source php/net/URL.php

Description

Class URL


Static Methods


Methods


Static Methods

encode()

URL::encode(string $text, string $encoding): string

decode()

URL::decode(string $text, string $encoding): string

Methods

__construct()

__construct(string $uri): void

openConnection()

openConnection(php\net\Proxy $proxy): URLConnection

getAuthority()

getAuthority(): string

Gets the authority part of this URL


getPort()

getPort(): int

getDefaultPort()

getDefaultPort(): int

Gets the default port number of the protocol associated with this URL. If the URL scheme or the URLStreamHandler for the URL do not define a default port number, then -1 is returned.


getProtocol()

getProtocol(): string

Gets the protocol name of this URL


getHost()

getHost(): string

getFile()

getFile(): string

Gets the file name of this URL. The returned file portion will be the same as getPath(), plus the concatenation of the value of getQuery(), if any. If there is no query portion, this method and getPath() will return identical results.


getPath()

getPath(): string

getQuery()

getQuery(): string

getRef()

getRef(): string

Gets the anchor (also known as the "reference") of this URL


sameFile()

sameFile(php\net\URL $url): bool

Compares two URLs, excluding the fragment component.


toString()

toString(): string

toExternalForm()

toExternalForm(): string

Constructs a string representation of this URL. The string is created by calling the toExternalForm method of the stream protocol handler for this object.


openStream()

openStream(): Stream

__toString()

__toString(): string