- class
URL
(php\net\URL
) - package
std
- source
php/net/URL.php
Description
Class URL
->
__construct()
->
openConnection()
->
getAuthority()
- Gets the authority part of thisURL
->
getPort()
->
getDefaultPort()
- Gets the default port number of the protocol associated->
getProtocol()
- Gets the protocol name of thisURL
->
getHost()
->
getFile()
- Gets the file name of thisURL
.->
getPath()
->
getQuery()
->
getRef()
- Gets the anchor (also known as the "reference") of this URL->
sameFile()
- Compares two URLs, excluding the fragment component.->
toString()
->
toExternalForm()
- Constructs a string representation of this URL. The->
openStream()
->
__toString()
URL::encode(string $text, string $encoding): string
URL::decode(string $text, string $encoding): string
__construct(string $uri): void
openConnection(php\net\Proxy $proxy): URLConnection
getAuthority(): string
Gets the authority part of this URL
getPort(): int
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(): string
Gets the protocol name of this URL
getHost(): string
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(): string
getQuery(): string
getRef(): string
Gets the anchor (also known as the "reference") of this URL
sameFile(php\net\URL $url): bool
Compares two URLs, excluding the fragment component.
toString(): string
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(): Stream
__toString(): string