ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
The scope of this class is split ilias-conform URI's into components. More...
Public Member Functions | |
__construct (string $uri_string) | |
schema () | |
withSchema (string $schema) | |
Get URI with modified schema. More... | |
authority () | |
withAuthority (string $authority) | |
Get URI with modified authority. More... | |
port () | |
withPort (int $port=null) | |
Get URI with modified port. More... | |
host () | |
withHost (string $host) | |
Get URI with modified host. More... | |
path () | |
withPath (string $path=null) | |
Get URI with modified path. More... | |
query () | |
withQuery (string $query=null) | |
Get URI with modified query. More... | |
fragment () | |
withFragment (string $fragment=null) | |
Get URI with modified fragment. More... | |
baseURI () | |
Get a well-formed URI consisting only out of schema, authority and port. More... | |
Data Fields | |
const | PATH_DELIM = '/' |
const | ALPHA = '[A-Za-z]' |
Relevant character-groups as defined in RFC 3986 Appendix 1. More... | |
const | DIGIT = '[0-9]' |
const | ALPHA_DIGIT = '[A-Za-z0-9]' |
const | HEXDIG = '[0-9A-Fa-f]' |
const | PCTENCODED = '%' . self::HEXDIG . self::HEXDIG |
const | PIMP = '[\\+\\-\\.]' |
point|minus|plus to be used in schema. More... | |
const | SUBDELIMS = '[\\$,;=!&\'\\(\\)\\*\\+]' |
valid subdelims according to RFC 3986 Appendix 1: "!" "$" "&" "'" "(" ")" "*" "+" "," ";" "=" More... | |
const | BASEURI_SUBDELIMS = '[\\$,;&\'\\*]' |
subdelims without jsf**k characters +!() and = More... | |
const | UNRESERVED = self::ALPHA_DIGIT . '|[\\-\\._~]' |
const | UNRESERVED_NO_DOT = self::ALPHA_DIGIT . '|[\\-_~]' |
const | PCHAR = self::UNRESERVED . '|' . self::SUBDELIMS . '|' . self::PCTENCODED . '|:|@' |
const | BASEURI_PCHAR = self::UNRESERVED . '|' . self::BASEURI_SUBDELIMS . '|' . self::PCTENCODED . '|:|@' |
const | SCHEMA = '#^' . self::ALPHA . '(' . self::ALPHA_DIGIT . '|' . self::PIMP . ')*$#' |
const | DOMAIN_LABEL = self::ALPHA_DIGIT . '((' . self::UNRESERVED_NO_DOT . '|' . self::PCTENCODED . '|' . self::BASEURI_SUBDELIMS . ')*' . self::ALPHA_DIGIT . ')*' |
const | HOST_REG_NAME = '^' . self::DOMAIN_LABEL . '(\\.' . self::DOMAIN_LABEL . ')*$' |
const | HOST_IPV4 = '^(' . self::DIGIT . '{1,3})(\\.' . self::DIGIT . '{1,3}){3}$' |
const | HOST = '#' . self::HOST_IPV4 . '|' . self::HOST_REG_NAME . '#' |
const | PORT = '#^' . self::DIGIT . '+$#' |
const | PATH = '#^(?!//)(?!:)(' . self::PCHAR . '|' . self::PATH_DELIM . ')+$#' |
const | QUERY = '#^(' . self::PCHAR . '|' . self::PATH_DELIM . '|\\?)+$#' |
const | FRAGMENT = '#^(' . self::PCHAR . '|' . self::PATH_DELIM . '|\\?|\\#)+$#' |
Protected Member Functions | |
digestSchema (string $schema) | |
Check schema formating. More... | |
digestHost (string $host) | |
Check host formating. More... | |
digestPort (int $port=null) | |
Check port formating. More... | |
digestPath (string $path=null) | |
Check path formating. More... | |
digestQuery (string $query=null) | |
Check query formating. More... | |
digestFragment (string $fragment=null) | |
Check fragment formating. More... | |
checkCorrectFormatOrThrow (string $regexp, string $string) | |
Check wether a string fits a regexp. More... | |
Protected Attributes | |
$schema | |
$host | |
$port | |
$path | |
$query | |
$fragment | |
The scope of this class is split ilias-conform URI's into components.
Please refer to RFC 3986 for details. Notice, ilias-confor URI's will form a SUBSET of RFC 3986:
ILIAS\Data\URI::__construct | ( | string | $uri_string | ) |
Definition at line 85 of file URI.php.
References ILIAS\Data\URI\digestFragment(), ILIAS\Data\URI\digestHost(), ILIAS\Data\URI\digestPath(), ILIAS\Data\URI\digestPort(), ILIAS\Data\URI\digestQuery(), ILIAS\Data\URI\digestSchema(), ILIAS\Data\URI\fragment(), ILIAS\Data\URI\host(), ILIAS\Data\URI\path(), ILIAS\Data\URI\port(), ILIAS\Data\URI\query(), and ILIAS\Data\URI\schema().
ILIAS\Data\URI::authority | ( | ) |
Definition at line 226 of file URI.php.
References ILIAS\Data\URI\$port, ILIAS\Data\URI\host(), and ILIAS\Data\URI\port().
Referenced by ILIAS\Data\URI\baseURI().
ILIAS\Data\URI::baseURI | ( | ) |
Get a well-formed URI consisting only out of schema, authority and port.
Definition at line 376 of file URI.php.
References ILIAS\Data\URI\$path, ILIAS\Data\URI\authority(), ILIAS\Data\URI\path(), and ILIAS\Data\URI\schema().
|
protected |
Check wether a string fits a regexp.
Return it, if so, throw otherwise.
string | $regexp | |
string | $string |
Definition at line 192 of file URI.php.
Referenced by ILIAS\Data\URI\digestFragment(), ILIAS\Data\URI\digestHost(), ILIAS\Data\URI\digestPath(), ILIAS\Data\URI\digestQuery(), ILIAS\Data\URI\digestSchema(), and ILIAS\Data\URI\withAuthority().
|
protected |
Check fragment formating.
Return it in case of success.
string | null | $fragment |
Definition at line 174 of file URI.php.
References ILIAS\Data\URI\$fragment, and ILIAS\Data\URI\checkCorrectFormatOrThrow().
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withFragment().
|
protected |
Check host formating.
Return it in case of success.
string | $host |
Definition at line 114 of file URI.php.
References ILIAS\Data\URI\checkCorrectFormatOrThrow().
Referenced by ILIAS\Data\URI\__construct(), ILIAS\Data\URI\withAuthority(), and ILIAS\Data\URI\withHost().
|
protected |
Check path formating.
Return it in case of success.
string | null | $path |
Definition at line 140 of file URI.php.
References ILIAS\Data\URI\$path, ILIAS\Data\URI\checkCorrectFormatOrThrow(), and PATH.
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withPath().
|
protected |
Check port formating.
Return it in case of success.
int | null | $port |
Definition at line 125 of file URI.php.
References ILIAS\Data\URI\$port.
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withPort().
|
protected |
Check query formating.
Return it in case of success.
string | null | $query |
Definition at line 159 of file URI.php.
References ILIAS\Data\URI\$query, and ILIAS\Data\URI\checkCorrectFormatOrThrow().
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withQuery().
|
protected |
Check schema formating.
Return it in case of success.
string | $schema |
Definition at line 102 of file URI.php.
References ILIAS\Data\URI\checkCorrectFormatOrThrow().
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withSchema().
ILIAS\Data\URI::fragment | ( | ) |
Definition at line 351 of file URI.php.
References ILIAS\Data\URI\$fragment.
Referenced by ILIAS\Data\URI\__construct().
ILIAS\Data\URI::host | ( | ) |
Definition at line 284 of file URI.php.
References ILIAS\Data\URI\$host.
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\authority().
ILIAS\Data\URI::path | ( | ) |
Definition at line 307 of file URI.php.
References ILIAS\Data\URI\$path.
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\baseURI().
ILIAS\Data\URI::port | ( | ) |
Definition at line 262 of file URI.php.
References ILIAS\Data\URI\$port.
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\authority().
ILIAS\Data\URI::query | ( | ) |
Definition at line 329 of file URI.php.
References ILIAS\Data\URI\$query.
Referenced by ILIAS\Data\URI\__construct().
ILIAS\Data\URI::schema | ( | ) |
Definition at line 203 of file URI.php.
References ILIAS\Data\URI\$schema.
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\baseURI().
ILIAS\Data\URI::withAuthority | ( | string | $authority | ) |
Get URI with modified authority.
string | $authority |
Definition at line 242 of file URI.php.
References ILIAS\Data\URI\$host, ILIAS\Data\URI\$port, ILIAS\Data\URI\checkCorrectFormatOrThrow(), and ILIAS\Data\URI\digestHost().
ILIAS\Data\URI::withFragment | ( | string | $fragment = null | ) |
Get URI with modified fragment.
string | null | $fragment |
Definition at line 362 of file URI.php.
References ILIAS\Data\URI\$fragment, and ILIAS\Data\URI\digestFragment().
ILIAS\Data\URI::withHost | ( | string | $host | ) |
Get URI with modified host.
string | $host |
Definition at line 295 of file URI.php.
References ILIAS\Data\URI\$host, and ILIAS\Data\URI\digestHost().
ILIAS\Data\URI::withPath | ( | string | $path = null | ) |
Get URI with modified path.
string | null | $path |
Definition at line 318 of file URI.php.
References ILIAS\Data\URI\$path, and ILIAS\Data\URI\digestPath().
ILIAS\Data\URI::withPort | ( | int | $port = null | ) |
Get URI with modified port.
int | null | $port |
Definition at line 273 of file URI.php.
References ILIAS\Data\URI\$port, and ILIAS\Data\URI\digestPort().
ILIAS\Data\URI::withQuery | ( | string | $query = null | ) |
Get URI with modified query.
string | null | $query |
Definition at line 340 of file URI.php.
References ILIAS\Data\URI\$query, and ILIAS\Data\URI\digestQuery().
ILIAS\Data\URI::withSchema | ( | string | $schema | ) |
Get URI with modified schema.
string | $schema |
Definition at line 214 of file URI.php.
References ILIAS\Data\URI\$schema, and ILIAS\Data\URI\digestSchema().
|
protected |
Definition at line 42 of file URI.php.
Referenced by ILIAS\Data\URI\digestFragment(), ILIAS\Data\URI\fragment(), and ILIAS\Data\URI\withFragment().
|
protected |
Definition at line 26 of file URI.php.
Referenced by ILIAS\Data\URI\host(), ILIAS\Data\URI\withAuthority(), and ILIAS\Data\URI\withHost().
|
protected |
Definition at line 34 of file URI.php.
Referenced by ILIAS\Data\URI\baseURI(), ILIAS\Data\URI\digestPath(), ILIAS\Data\URI\path(), and ILIAS\Data\URI\withPath().
|
protected |
Definition at line 30 of file URI.php.
Referenced by ILIAS\Data\URI\authority(), ILIAS\Data\URI\digestPort(), ILIAS\Data\URI\port(), ILIAS\Data\URI\withAuthority(), and ILIAS\Data\URI\withPort().
|
protected |
Definition at line 38 of file URI.php.
Referenced by ILIAS\Data\URI\digestQuery(), ILIAS\Data\URI\query(), and ILIAS\Data\URI\withQuery().
|
protected |
Definition at line 22 of file URI.php.
Referenced by ILIAS\Data\URI\schema(), and ILIAS\Data\URI\withSchema().
const ILIAS\Data\URI::ALPHA = '[A-Za-z]' |
const ILIAS\Data\URI::BASEURI_PCHAR = self::UNRESERVED . '|' . self::BASEURI_SUBDELIMS . '|' . self::PCTENCODED . '|:|@' |
const ILIAS\Data\URI::BASEURI_SUBDELIMS = '[\\$,;&\'\\*]' |
const ILIAS\Data\URI::DOMAIN_LABEL = self::ALPHA_DIGIT . '((' . self::UNRESERVED_NO_DOT . '|' . self::PCTENCODED . '|' . self::BASEURI_SUBDELIMS . ')*' . self::ALPHA_DIGIT . ')*' |
const ILIAS\Data\URI::FRAGMENT = '#^(' . self::PCHAR . '|' . self::PATH_DELIM . '|\\?|\\#)+$#' |
const ILIAS\Data\URI::HOST = '#' . self::HOST_IPV4 . '|' . self::HOST_REG_NAME . '#' |
const ILIAS\Data\URI::HOST_IPV4 = '^(' . self::DIGIT . '{1,3})(\\.' . self::DIGIT . '{1,3}){3}$' |
const ILIAS\Data\URI::HOST_REG_NAME = '^' . self::DOMAIN_LABEL . '(\\.' . self::DOMAIN_LABEL . ')*$' |
const ILIAS\Data\URI::PATH = '#^(?!//)(?!:)(' . self::PCHAR . '|' . self::PATH_DELIM . ')+$#' |
const ILIAS\Data\URI::PCHAR = self::UNRESERVED . '|' . self::SUBDELIMS . '|' . self::PCTENCODED . '|:|@' |
const ILIAS\Data\URI::PCTENCODED = '%' . self::HEXDIG . self::HEXDIG |
const ILIAS\Data\URI::PIMP = '[\\+\\-\\.]' |
const ILIAS\Data\URI::QUERY = '#^(' . self::PCHAR . '|' . self::PATH_DELIM . '|\\?)+$#' |
const ILIAS\Data\URI::SCHEMA = '#^' . self::ALPHA . '(' . self::ALPHA_DIGIT . '|' . self::PIMP . ')*$#' |
const ILIAS\Data\URI::SUBDELIMS = '[\\$,;=!&\'\\(\\)\\*\\+]' |
const ILIAS\Data\URI::UNRESERVED = self::ALPHA_DIGIT . '|[\\-\\._~]' |
const ILIAS\Data\URI::UNRESERVED_NO_DOT = self::ALPHA_DIGIT . '|[\\-_~]' |