|
ILIAS
release_7 Revision v7.30-3-g800a261c036
|
The scope of this class is split ilias-conform URI's into components. More...
Collaboration diagram for ILIAS\Data\URI:Public Member Functions | |
| __construct (string $uri_string) | |
| getSchema () | |
| withSchema (string $schema) | |
| Get URI with modified schema. More... | |
| getAuthority () | |
| withAuthority (string $authority) | |
| Get URI with modified authority. More... | |
| getPort () | |
| withPort (int $port=null) | |
| Get URI with modified port. More... | |
| getHost () | |
| withHost (string $host) | |
| Get URI with modified host. More... | |
| getPath () | |
| withPath (string $path=null) | |
| Get URI with modified path. More... | |
| getQuery () | |
| withQuery (string $query=null) | |
| Get URI with modified query. More... | |
| getFragment () | |
| withFragment (string $fragment=null) | |
| Get URI with modified fragment. More... | |
| getBaseURI () | |
| Get a well-formed URI consisting only of schema, authority and port. More... | |
| __toString () | |
| getParameters () | |
| Get all parameters as associative array. More... | |
| getParameter (string $param) | |
| Get the value of the given parameter (or null) More... | |
| withParameters (array $parameters) | |
| Get URI with modified parameters. More... | |
| withParameter (string $key, $value) | |
| Get URI with modified parameters. 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(), and ILIAS\Data\URI\digestSchema().
Here is the call graph for this function:| ILIAS\Data\URI::__toString | ( | ) |
Definition at line 385 of file URI.php.
References ILIAS\Data\URI\$fragment, ILIAS\Data\URI\$query, ILIAS\Data\URI\getBaseURI(), ILIAS\Data\URI\getFragment(), and ILIAS\Data\URI\getQuery().
Here is the call graph for this function:
|
protected |
Check wether a string fits a regexp.
Return it, if so, throw otherwise.
| string | $regexp | |
| string | $string |
InvalidArgumentException
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().
Here is the caller graph for this function:
|
protected |
Check fragment formating.
Return it in case of success.
| string | null | $fragment |
InvalidArgumentException
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().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Check host formating.
Return it in case of success.
| string | $host |
InvalidArgumentException
Definition at line 114 of file URI.php.
References ILIAS\Data\URI\$host, and ILIAS\Data\URI\checkCorrectFormatOrThrow().
Referenced by ILIAS\Data\URI\__construct(), ILIAS\Data\URI\withAuthority(), and ILIAS\Data\URI\withHost().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Check path formating.
Return it in case of success.
| string | null | $path |
InvalidArgumentException
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().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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().
Here is the caller graph for this function:
|
protected |
Check query formating.
Return it in case of success.
| string | null | $query |
InvalidArgumentException
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().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Check schema formating.
Return it in case of success.
| string | $schema |
InvalidArgumentException
Definition at line 102 of file URI.php.
References ILIAS\Data\URI\$schema, and ILIAS\Data\URI\checkCorrectFormatOrThrow().
Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withSchema().
Here is the call graph for this function:
Here is the caller graph for this function:| ILIAS\Data\URI::getAuthority | ( | ) |
Definition at line 226 of file URI.php.
References ILIAS\Data\URI\$port, ILIAS\Data\URI\getHost(), and ILIAS\Data\URI\getPort().
Referenced by ILIAS\Data\URI\getBaseURI().
Here is the call graph for this function:
Here is the caller graph for this function:| ILIAS\Data\URI::getBaseURI | ( | ) |
Get a well-formed URI consisting only of schema, authority and port.
Definition at line 376 of file URI.php.
References ILIAS\Data\URI\$path, ILIAS\Data\URI\getAuthority(), ILIAS\Data\URI\getPath(), and ILIAS\Data\URI\getSchema().
Referenced by ILIAS\Data\URI\__toString().
Here is the call graph for this function:
Here is the caller graph for this function:| ILIAS\Data\URI::getFragment | ( | ) |
Definition at line 351 of file URI.php.
References ILIAS\Data\URI\$fragment.
Referenced by ILIAS\Data\URI\__toString().
Here is the caller graph for this function:| ILIAS\Data\URI::getHost | ( | ) |
Definition at line 284 of file URI.php.
References ILIAS\Data\URI\$host.
Referenced by ILIAS\Data\URI\getAuthority().
Here is the caller graph for this function:| ILIAS\Data\URI::getParameter | ( | string | $param | ) |
Get the value of the given parameter (or null)
Definition at line 416 of file URI.php.
References $param, and ILIAS\Data\URI\getParameters().
Here is the call graph for this function:| ILIAS\Data\URI::getParameters | ( | ) |
Get all parameters as associative array.
Definition at line 402 of file URI.php.
References ILIAS\Data\URI\$query, and ILIAS\Data\URI\getQuery().
Referenced by ILIAS\Data\URI\getParameter(), and ILIAS\Data\URI\withParameter().
Here is the call graph for this function:
Here is the caller graph for this function:| ILIAS\Data\URI::getPath | ( | ) |
Definition at line 307 of file URI.php.
References ILIAS\Data\URI\$path.
Referenced by ILIAS\Data\URI\getBaseURI().
Here is the caller graph for this function:| ILIAS\Data\URI::getPort | ( | ) |
Definition at line 262 of file URI.php.
References ILIAS\Data\URI\$port.
Referenced by ILIAS\Data\URI\getAuthority().
Here is the caller graph for this function:| ILIAS\Data\URI::getQuery | ( | ) |
Definition at line 329 of file URI.php.
References ILIAS\Data\URI\$query.
Referenced by ILIAS\Data\URI\__toString(), and ILIAS\Data\URI\getParameters().
Here is the caller graph for this function:| ILIAS\Data\URI::getSchema | ( | ) |
Definition at line 203 of file URI.php.
References ILIAS\Data\URI\$schema.
Referenced by ILIAS\Data\URI\getBaseURI().
Here is the caller graph for this function:| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| ILIAS\Data\URI::withParameter | ( | string | $key, |
| $value | |||
| ) |
Get URI with modified parameters.
Definition at line 438 of file URI.php.
References ILIAS\Data\URI\getParameters(), and ILIAS\Data\URI\withParameters().
Here is the call graph for this function:| ILIAS\Data\URI::withParameters | ( | array | $parameters | ) |
Get URI with modified parameters.
Definition at line 428 of file URI.php.
References ILIAS\Data\URI\withQuery().
Referenced by URITest\testWithParameters(), and ILIAS\Data\URI\withParameter().
Here is the call graph for this function:
Here is the caller graph for this function:| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| 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().
Referenced by ILIAS\Data\URI\withParameters().
Here is the call graph for this function:
Here is the caller graph for this function:| 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().
Here is the call graph for this function:
|
protected |
Definition at line 42 of file URI.php.
Referenced by ILIAS\Data\URI\__toString(), ILIAS\Data\URI\digestFragment(), ILIAS\Data\URI\getFragment(), and ILIAS\Data\URI\withFragment().
|
protected |
Definition at line 26 of file URI.php.
Referenced by ILIAS\Data\URI\digestHost(), ILIAS\Data\URI\getHost(), ILIAS\Data\URI\withAuthority(), and ILIAS\Data\URI\withHost().
|
protected |
Definition at line 34 of file URI.php.
Referenced by ILIAS\Data\URI\digestPath(), ILIAS\Data\URI\getBaseURI(), ILIAS\Data\URI\getPath(), and ILIAS\Data\URI\withPath().
|
protected |
Definition at line 30 of file URI.php.
Referenced by ILIAS\Data\URI\digestPort(), ILIAS\Data\URI\getAuthority(), ILIAS\Data\URI\getPort(), ILIAS\Data\URI\withAuthority(), and ILIAS\Data\URI\withPort().
|
protected |
Definition at line 38 of file URI.php.
Referenced by ILIAS\Data\URI\__toString(), ILIAS\Data\URI\digestQuery(), ILIAS\Data\URI\getParameters(), ILIAS\Data\URI\getQuery(), and ILIAS\Data\URI\withQuery().
|
protected |
Definition at line 22 of file URI.php.
Referenced by ILIAS\Data\URI\digestSchema(), ILIAS\Data\URI\getSchema(), 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 . '|[\\-_~]' |