Class URL
A universal identifier (a URL record). A URL consists of components, namely a scheme, scheme data, username, password, host, port, path, query, and fragment.
public
string
|
|
public
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
#
isIncludingCredentials( )
A URL includes credentials if either its username is not the empty string or its password is non-null. |
public
boolean
|
#
cannotHaveUsernamePasswordPort( )
A URL cannot have a username/password/port if its host is null or the empty string, its cannot-be-a-base-URL flag is set, or its scheme is “file”. |
public static
boolean
|
#
stringStartsWithWindowsDriveLetter( string $str )
Returns |
public
|
|
public
|
|
public static
|
#
parseURL( string $input,
The URL parser. |
public static
|
#
parseBasicURL( string $input,
The basic URL parser. |
public
|
|
public
|
|
public
|
|
public
(string|integer|null)[]|string
|
string |
WINDOWS_DRIVE_LETTER
The regular expression (PCRE) pattern matching a Windows drive letter. |
#
'/^[a-z][:|]$/ui'
|
string |
NORMALIZED_WINDOWS_DRIVE_LETTER
The regular expression (PCRE) pattern matching a normalized Windows drive letter. |
#
'/^[a-z]:$/ui'
|
string |
SINGLE_DOT_PATH_SEGMENT
The regular expression (PCRE) pattern matching a single-dot path segment. |
#
'/^(?:\\.|%2e)$/ui'
|
string |
DOUBLE_DOT_PATH_SEGMENT
The regular expression (PCRE) pattern matching a double-dot path segment. |
#
'/^(?:\\.|%2e){2}$/ui'
|
string |
URL_CODE_POINTS
The regular expression (PCRE) pattern matching the URL code points. |
#
'/[!$&\'()*+,\\-.\\/:;=?@_~\xC2\xA0--﷏ﷰ-�𐀀-𠀀-𰀀--------------]/u'
|
public
string
|
$scheme
A URL’s scheme is a string that identifies the type of URL and can be used to dispatch a URL for further processing after parsing. |
#
''
|
public
string
|
$username
A URL’s username is a string identifying a user. |
#
''
|
public
string
|
$password
A URL’s password is either null or a string identifying a user’s credentials. |
#
''
|
public
string|integer|float|integer[]|null
|
$host
A URL’s host is either null or a host. |
#
null
|
public
integer|null
|
$port
A URL’s port is either null or a 16-bit integer that identifies a networking port. |
#
null
|
public
string[]
|
$path
A URL’s path is a list of zero or more strings holding data, usually identifying a location in hierarchical form. |
#
[]
|
public
string|null
|
$query
A URL’s query is either null or a string holding data. |
#
null
|
public
string
|
$fragment
A URL’s fragment is either null or a string holding data that can be used for further processing on the resource the URL’s other components identify. |
#
null
|
public
A
|
$cannotBeABaseURLFlag
URL also has an associated cannot-be-a-base-URL flag. |
#
false
|
public
object|null
|
$object
A URL also has an associated object that is either null or a Blob object. |
#
null
|
public static
(int|null)[]
|
$specialSchemes
A special scheme is a scheme in the key of this array. A default port is a special scheme’s optional corresponding port and is in the value on the key. |
#
[
'ftp' => 21,
'file' => null,
'gopher' => 70,
'http' => 80,
'https' => 443,
'ws' => 80,
'wss' => 443,
]
|
public static
string[]
|
$localSchemes
A local scheme is a scheme that is one of “about”, “blob”, “data”, and “filesystem”. |
#
['about', 'blob', 'data', 'filesystem']
|
public
boolean
|
$nonRelativeFlag
[Deprecated] Alias of $cannotBeABaseURLFlag. |