Menu

## Uri
in package

Uri.php : 10

### Table of Contents

$authority : string
$fqdn : string
$fragment : string
$host : string
$pass : string
$path : string
$port : mixed
$pqdn : string
$query : string
$scheme : string
$url : string
$user : string
__construct() : mixed
__toArray() : array<string|int, mixed>
__toString() : string
  Return the string representation as a URI reference.
getAuthority() : string
  Retrieve the authority component of the URI.
getFQDN() : string
getFragment() : string
  Retrieve the fragment component of the URI.
getHost() : string
  Retrieve the host component of the URI.
getPath() : string
  Retrieve the path component of the URI.
getPort() : null|int
  Retrieve the port component of the URI.
getPQDN() : string
getQuery() : string
  Retrieve the query string of the URI.
getScheme() : string
  Retrieve the scheme component of the URI.
getUserInfo() : string
  Retrieve the user information component of the URI.

### Properties

#### $authority

Uri.php : 21
`private string $authority`

#### $fqdn

Uri.php : 13
`private string $fqdn`

#### $fragment

Uri.php : 35
`private string $fragment`

#### $host

Uri.php : 27
`private string $host`

#### $pass

Uri.php : 25
`private string $pass`

#### $path

Uri.php : 31
`private string $path`

#### $port

Uri.php : 29
`private mixed $port`

#### $pqdn

Uri.php : 15
`private string $pqdn`

#### $query

Uri.php : 33
`private string $query`

#### $scheme

Uri.php : 19
`private string $scheme`

#### $url

Uri.php : 17
`private string $url`

#### $user

Uri.php : 23
`private string $user`

### Methods

#### __construct()

Uri.php : 37
`public __construct() : mixed`

##### Return values

mixed —

#### __toArray()

Uri.php : 428
`public __toArray() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### __toString()

Uri.php : 423

Return the string representation as a URI reference.

`public __toString() : string`

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:

- If a scheme is present, it MUST be suffixed by ":".
- If an authority is present, it MUST be prefixed by "//".
- The path can be concatenated without delimiters. But there are two cases where the path has to be adjusted to make the URI reference valid as PHP does not allow to throw an exception in __toString():
  - If the path is rootless and an authority is present, the path MUST be prefixed by "/".
  - If the path is starting with more than one "/" and no authority is present, the starting slashes MUST be reduced to one.
- If a query is present, it MUST be prefixed by "?".
- If a fragment is present, it MUST be prefixed by "#".

##### Tags

see
  http://tools.ietf.org/html/rfc3986#section-4.1

##### Return values

string —

#### getAuthority()

Uri.php : 101

Retrieve the authority component of the URI.

`public getAuthority() : string`

If no authority information is present, this method returns 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 will not be included.

##### Tags

see
  https://tools.ietf.org/html/rfc3986#section-3.2

##### Return values

string —

The URI authority, in "[user-info@]host[:port]" format.

#### getFQDN()

Uri.php : 72
`public getFQDN() : string`

##### Return values

string —

#### getFragment()

Uri.php : 248

Retrieve the fragment component of the URI.

`public getFragment() : string`

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.

##### Tags

see
  https://tools.ietf.org/html/rfc3986#section-2
see
  https://tools.ietf.org/html/rfc3986#section-3.5

##### Return values

string —

The URI fragment.

#### getHost()

Uri.php : 154

Retrieve the host component of the URI.

`public getHost() : string`

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.

##### Tags

see
  http://tools.ietf.org/html/rfc3986#section-3.2.2

##### Return values

string —

The URI host.

#### getPath()

Uri.php : 205

Retrieve the path component of the URI.

`public getPath() : string`

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.

##### Tags

see
  https://tools.ietf.org/html/rfc3986#section-2
see
  https://tools.ietf.org/html/rfc3986#section-3.3

##### Return values

string —

The URI path.

#### getPort()

Uri.php : 174

Retrieve the port component of the URI.

`public getPort() : null|int`

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.

##### Return values

null|int —

The URI port.

#### getPQDN()

Uri.php : 77
`public getPQDN() : string`

##### Return values

string —

#### getQuery()

Uri.php : 227

Retrieve the query string of the URI.

`public getQuery() : string`

If no query string is present, this method returns an empty string.

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.

##### Tags

see
  https://tools.ietf.org/html/rfc3986#section-2
see
  https://tools.ietf.org/html/rfc3986#section-3.4

##### Return values

string —

The URI query string.

#### getScheme()

Uri.php : 67

Retrieve the scheme component of the URI.

`public getScheme() : string`

If no scheme is present, this method returns an empty string.

##### Tags

see
  https://tools.ietf.org/html/rfc3986#section-3.1

##### Return values

string —

The URI scheme.

#### getUserInfo()

Uri.php : 128

Retrieve the user information component of the URI.

`public getUserInfo() : string`

If no user information is present, this method returns 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.

##### Return values

string —

The URI user information, in "username[:password]" format.

## Search results