Class URL
The URL class represent an object providing static methods used for creating object URLs.
- esperecyan\url\URL implements JsonSerializable
Link: URL Standard
Link: URL - Web API Interfaces | MDN
Located at URL.php
public
|
#
__construct( string $url, string $base = null )
The constructor returns a newly created URL object representing the URL defined by the parameters. |
public static
string
|
|
public static
string
|
|
public
|
|
public
string|
|
|
public
string
|
|
public
string
|
|
public
boolean
|
public
string
|
$href
Is a USVString containing the whole URL. |
public
string
|
$protocol
Is a USVString containing the protocol scheme of the URL, including the final ‘:’. |
public
string
|
$username
Is a USVString containing the username specified before the domain name. |
public
string
|
$password
Is a USVString containing the password specified before the domain name. |
public
string
|
$host
Is a USVString containing the host, that is the hostname, and then, if the port of the URL is not empty (which can happen because it was not specified or because it was specified to be the default port of the URL’s scheme), a ‘:’, and the port of the URL. |
public
string
|
$hostname
Is a USVString containing the domain of the URL. |
public
string
|
$port
Is a USVString containing the port number of the URL. |
public
string
|
$pathname
Is a USVString containing an initial ‘/’ followed by the path of the URL. |
public
string
|
$search
Is a USVString containing a ‘?’ followed by the parameters of the URL. |
public
string
|
$hash
Is a USVString containing a ‘#’ followed by the fragment identifier of the URL. |
public read-only
string
|
$origin
Returns a USVString containing the canonical form of the origin of the specific location. |
public read-only
|
$searchParams
Returns a URLSearchParams object allowing to access the GET query arguments contained in the URL. |