Documentation

AbstractUri
in package
implements UriInterface

AbstractYes

Bare minimum PSR7 implementation.

Using message PSR-7 decorators instead.

Table of Contents

Interfaces

UriInterface

Properties

$defaultPorts  : array<string|int, mixed>
$fragment  : string
$host  : string
$password  : string
$path  : string
$port  : int|null
$query  : string
$scheme  : string
$user  : string

Methods

__construct()  : mixed
Please define constructor which calls $this->init().
__toString()  : string
getAuthority()  : mixed
getFragment()  : mixed
getHost()  : mixed
getPath()  : mixed
getPort()  : mixed
getQuery()  : mixed
getScheme()  : mixed
getUserInfo()  : mixed
withFragment()  : mixed
withHost()  : mixed
withPath()  : mixed
withPort()  : mixed
withQuery()  : mixed
withScheme()  : mixed
withUserInfo()  : mixed
getBaseUrl()  : string
Return the fully qualified base URL ( like http://getgrav.org ).
getParts()  : array<string|int, mixed>
getPassword()  : string
getUrl()  : string
getUser()  : string
initParts()  : void
isDefaultPort()  : bool
unsetDefaultPort()  : void
validate()  : void

Properties

$defaultPorts

protected static array<string|int, mixed> $defaultPorts = ['http' => 80, 'https' => 443]

$fragment

private string $fragment = ''

Uri fragment (without #).

$password

private string $password = ''

Uri password.

$query

private string $query = ''

Uri query string (without ?).

Methods

__construct()

Please define constructor which calls $this->init().

public abstract __construct() : mixed

__toString()

public __toString() : string
Attributes
#[ReturnTypeWillChange]
Return values
string

getAuthority()

public getAuthority() : mixed
Tags
inheritdoc

getFragment()

public getFragment() : mixed
Tags
inheritdoc

getQuery()

public getQuery() : mixed
Tags
inheritdoc

getScheme()

public getScheme() : mixed
Tags
inheritdoc

getUserInfo()

public getUserInfo() : mixed
Tags
inheritdoc

withFragment()

public withFragment(mixed $fragment) : mixed
Parameters
$fragment : mixed
Tags
inheritdoc
throws
InvalidArgumentException

withHost()

public withHost(mixed $host) : mixed
Parameters
$host : mixed
Tags
inheritdoc

withPath()

public withPath(mixed $path) : mixed
Parameters
$path : mixed
Tags
inheritdoc

withPort()

public withPort(mixed $port) : mixed
Parameters
$port : mixed
Tags
inheritdoc

withQuery()

public withQuery(mixed $query) : mixed
Parameters
$query : mixed
Tags
inheritdoc

withScheme()

public withScheme(mixed $scheme) : mixed
Parameters
$scheme : mixed
Tags
inheritdoc

withUserInfo()

public withUserInfo(mixed $user[, mixed $password = null ]) : mixed
Parameters
$user : mixed
$password : mixed = null
Tags
inheritdoc
throws
InvalidArgumentException

getBaseUrl()

Return the fully qualified base URL ( like http://getgrav.org ).

protected getBaseUrl() : string

Note that this method never includes a trailing /

Return values
string

getParts()

protected getParts() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPassword()

protected getPassword() : string
Return values
string

getUrl()

protected getUrl() : string
Return values
string

getUser()

protected getUser() : string
Return values
string

initParts()

protected initParts(array<string|int, mixed> $parts) : void
Parameters
$parts : array<string|int, mixed>
Tags
throws
InvalidArgumentException

isDefaultPort()

protected isDefaultPort() : bool
Return values
bool

unsetDefaultPort()

private unsetDefaultPort() : void

validate()

private validate() : void
Tags
throws
InvalidArgumentException

        
On this page

Search results