URL¶
-
php\net\URL
Class URL
Methods
__construct
($uri)¶
Parameters:
- $uri – string
openConnection
($proxy)¶
Parameters:
- $proxy – php\net\Proxy - (optional)
Returns:
getAuthority
()¶Gets the authority part of this
URL
Returns: string
getPort
()¶
Returns: int
getDefaultPort
()¶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.
Returns: int
getProtocol
()¶Gets the protocol name of this
URL
Returns: string
getHost
()¶
Returns: string
getFile
()¶Gets the file name of this <code>URL</code>. The returned file portion will be the same as
getPath()
, plus the concatenation of the value ofgetQuery()
, if any. If there is no query portion, this method andgetPath()
will return identical results.
Returns: string
getPath
()¶
Returns: string
getQuery
()¶
Returns: string
getRef
()¶Gets the anchor (also known as the “reference”) of this URL
Returns: string
sameFile
($url)¶Compares two URLs, excluding the fragment component.
Parameters:
- $url – php\net\URL
Returns: bool
toString
()¶
Returns: string
toExternalForm
()¶Constructs a string representation of this URL. The string is created by calling the toExternalForm method of the stream protocol handler for this object.
Returns: string
openStream
()¶
Returns: php\io\Stream
__toString
()¶
Returns: string