- 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): stringURL::decode(string $text, string $encoding): string__construct(string $uri): voidopenConnection(php\net\Proxy $proxy): URLConnectiongetAuthority(): stringGets the authority part of this URL
getPort(): intgetDefaultPort(): intGets 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(): stringGets the protocol name of this URL
getHost(): stringgetFile(): stringGets 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(): stringgetQuery(): stringgetRef(): stringGets the anchor (also known as the "reference") of this URL
sameFile(php\net\URL $url): boolCompares two URLs, excluding the fragment component.
toString(): stringtoExternalForm(): stringConstructs 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