Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (string $uri='') | |
__toString () | |
getScheme () | |
getAuthority () | |
getUserInfo () | |
getHost () | |
getPort () | |
getPath () | |
getQuery () | |
getFragment () | |
withScheme ($scheme) | |
withUserInfo ($user, $password=null) | |
withHost ($host) | |
withPort ($port) | |
withPath ($path) | |
withQuery ($query) | |
withFragment ($fragment) | |
Fonctions membres privées | |
filterPort ($port) | |
filterPath ($path) | |
filterQueryAndFragment ($str) | |
Fonctions membres privées statiques | |
static | createUriString (string $scheme, string $authority, string $path, string $query, string $fragment) |
static | isNonStandardPort (string $scheme, int $port) |
static | rawurlencodeMatchZero (array $match) |
Attributs privés | |
const | SCHEMES = ['http' => 80 |
const const | CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~' |
const | CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;=' |
$scheme = '' | |
$userInfo = '' | |
$host = '' | |
$port | |
$path = '' | |
$query = '' | |
$fragment = '' | |
PSR-7 URI implementation.
This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md
__construct | ( | string | $uri = '' | ) |
Références $parts, Nyholm\Psr7\$uri, Uri\filterPath(), Uri\filterPort(), Uri\filterQueryAndFragment(), null, et path.
__toString | ( | ) |
Return the string representation as a URI reference.
Depending on which components of the URI are present, the resulting string is either a full URI or relative reference according to RFC 3986, Section 4.1. The method concatenates the various components of the URI, using the appropriate delimiters:
Implémente UriInterface.
Références Uri\getAuthority(), et path.
|
staticprivate |
Create a URI string from its various parts.
Références Uri\$fragment, Uri\$path, Uri\$query, Uri\$scheme, Nyholm\Psr7\$uri, et elseif.
|
private |
Références Uri\$path.
Référencé par Uri\__construct(), et Uri\withPath().
|
private |
Références Uri\$port, et null.
Référencé par Uri\__construct(), et Uri\withPort().
|
private |
Référencé par Uri\__construct(), Uri\withFragment(), et Uri\withQuery().
getAuthority | ( | ) |
Retrieve the authority component of the URI.
If no authority information is present, this method MUST return an empty string.
The authority syntax of the URI is:
[user-info@]host[:port]
If the port component is not set or is the standard port for the current scheme, it SHOULD NOT be included.
Implémente UriInterface.
Références Uri\$host, Uri\$port, et null.
Référencé par Uri\__toString().
getFragment | ( | ) |
Retrieve the fragment component of the URI.
If no fragment is present, this method MUST return an empty string.
The leading "#" character is not part of the fragment and MUST NOT be added.
The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.5.
Implémente UriInterface.
Références Uri\$fragment.
getHost | ( | ) |
Retrieve the host component of the URI.
If no host is present, this method MUST return an empty string.
The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.2.2.
Implémente UriInterface.
Références Uri\$host.
getPath | ( | ) |
Retrieve the path component of the URI.
The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes.
Normally, the empty path "" and absolute path "/" are considered equal as defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically do this normalization because in contexts with a trimmed base path, e.g. the front controller, this difference becomes significant. It's the task of the user to handle both "" and "/".
The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.3.
As an example, if the value should include a slash ("/") not intended as delimiter between path segments, that value MUST be passed in encoded form (e.g., "%2F") to the instance.
Implémente UriInterface.
Références Uri\$path.
getPort | ( | ) |
Retrieve the port component of the URI.
If a port is present, and it is non-standard for the current scheme, this method MUST return it as an integer. If the port is the standard port used with the current scheme, this method SHOULD return null.
If no port is present, and no scheme is present, this method MUST return a null value.
If no port is present, but a scheme is present, this method MAY return the standard port for that scheme, but SHOULD return null.
Implémente UriInterface.
Références Uri\$port.
getQuery | ( | ) |
Retrieve the query string of the URI.
If no query string is present, this method MUST return an empty string.
The leading "?" character is not part of the query and MUST NOT be added.
The value returned MUST be percent-encoded, but MUST NOT double-encode any characters. To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.4.
As an example, if a value in a key/value pair of the query string should include an ampersand ("&") not intended as a delimiter between values, that value MUST be passed in encoded form (e.g., "%26") to the instance.
Implémente UriInterface.
Références Uri\$query.
getScheme | ( | ) |
Retrieve the scheme component of the URI.
If no scheme is present, this method MUST return an empty string.
The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.1.
The trailing ":" character is not part of the scheme and MUST NOT be added.
Implémente UriInterface.
Références Uri\$scheme.
getUserInfo | ( | ) |
Retrieve the user information component of the URI.
If no user information is present, this method MUST return an empty string.
If a user is present in the URI, this will return that value; additionally, if the password is also present, it will be appended to the user value, with a colon (":") separating the values.
The trailing "@" character is not part of the user information and MUST NOT be added.
Implémente UriInterface.
Références Uri\$userInfo.
|
staticprivate |
Is a given port non-standard for the current scheme?
Références Uri\$port, et Uri\$scheme.
|
staticprivate |
withFragment | ( | $fragment | ) |
Return an instance with the specified URI fragment.
This method MUST retain the state of the current instance, and return an instance that contains the specified URI fragment.
Users can provide both encoded and decoded fragment characters. Implementations ensure the correct encoding as outlined in getFragment().
An empty fragment value is equivalent to removing the fragment.
string | $fragment | The fragment to use with the new instance. |
Implémente UriInterface.
Références Uri\$fragment, $this, et Uri\filterQueryAndFragment().
withHost | ( | $host | ) |
Return an instance with the specified host.
This method MUST retain the state of the current instance, and return an instance that contains the specified host.
An empty host value is equivalent to removing the host.
string | $host | The hostname to use with the new instance. |
Implémente UriInterface.
withPath | ( | $path | ) |
Return an instance with the specified path.
This method MUST retain the state of the current instance, and return an instance that contains the specified path.
The path can either be empty or absolute (starting with a slash) or rootless (not starting with a slash). Implementations MUST support all three syntaxes.
If the path is intended to be domain-relative rather than path relative then it must begin with a slash ("/"). Paths not starting with a slash ("/") are assumed to be relative to some base path known to the application or consumer.
Users can provide both encoded and decoded path characters. Implementations ensure the correct encoding as outlined in getPath().
string | $path | The path to use with the new instance. |
Implémente UriInterface.
Références Uri\$path, $this, Uri\filterPath(), et path.
withPort | ( | $port | ) |
Return an instance with the specified port.
This method MUST retain the state of the current instance, and return an instance that contains the specified port.
Implementations MUST raise an exception for ports outside the established TCP and UDP port ranges.
A null value provided for the port is equivalent to removing the port information.
null | int | $port | The port to use with the new instance; a null value removes the port information. |
Implémente UriInterface.
Références Uri\$port, $this, et Uri\filterPort().
withQuery | ( | $query | ) |
Return an instance with the specified query string.
This method MUST retain the state of the current instance, and return an instance that contains the specified query string.
Users can provide both encoded and decoded query characters. Implementations ensure the correct encoding as outlined in getQuery().
An empty query string value is equivalent to removing the query string.
string | $query | The query string to use with the new instance. |
Implémente UriInterface.
Références Uri\$query, $this, et Uri\filterQueryAndFragment().
withScheme | ( | $scheme | ) |
Return an instance with the specified scheme.
This method MUST retain the state of the current instance, and return an instance that contains the specified scheme.
Implementations MUST support the schemes "http" and "https" case insensitively, and MAY accommodate other schemes if required.
An empty scheme is equivalent to removing the scheme.
string | $scheme | The scheme to use with the new instance. |
Implémente UriInterface.
Références Uri\$scheme, et $this.
withUserInfo | ( | $user, | |
$password = null |
|||
) |
Return an instance with the specified user information.
This method MUST retain the state of the current instance, and return an instance that contains the specified user information.
Password is optional, but the user information MUST include the user; an empty string for the user is equivalent to removing user information.
string | $user | The user name to use for authority. |
null | string | $password | The password associated with $user. |
Implémente UriInterface.
|
private |
Référencé par Uri\createUriString(), Uri\getFragment(), et Uri\withFragment().
|
private |
Référencé par Uri\getAuthority(), Uri\getHost(), et Uri\withHost().
|
private |
Référencé par Uri\createUriString(), Uri\filterPath(), Uri\getPath(), et Uri\withPath().
|
private |
Référencé par Uri\filterPort(), Uri\getAuthority(), Uri\getPort(), Uri\isNonStandardPort(), et Uri\withPort().
|
private |
Référencé par Uri\createUriString(), Uri\getQuery(), et Uri\withQuery().
|
private |
Référencé par Uri\createUriString(), Uri\getScheme(), Uri\isNonStandardPort(), et Uri\withScheme().
|
private |
Référencé par Uri\getUserInfo().
|
private |
|
private |
|
private |