ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\Data\URI Class Reference

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...
 

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

string $schema
 
string $host
 
int $port
 
string $path
 
string $query
 
string $fragment
 

Private Attributes

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_EMBEDDED = '(' . self::DIGIT . '{1,3})(\\.' . self::DIGIT . '{1,3}){3}'
 
const HOST_IPV4 = '^' . self::HOST_IPV4_EMBEDDED . '$'
 
const IPV6_COUNT_COLONS = '(' . self::HEXDIG . '{1,4}:)'
 
const IPV6_COLONS_BETWEEN = '(' . self::HEXDIG . '{0,4}:' . self::HEXDIG . '{0,4})'
 
const IPV6_LEFT_SHORT = '(' . self::HEXDIG . '{1,4}|' . self::HEXDIG . '{1,4}(:' . self::HEXDIG . '{1,4})*)?'
 
const HOST_IPV6_LONG = '^\\[' . self::IPV6_COUNT_COLONS . '{7}' . self::HEXDIG . '{1,4}\\]$'
 
const HOST_IPV6_SHORT
 
const HOST_IPV6_EMBEDDED_IPV4_LONG = '^\\[' . self::IPV6_COUNT_COLONS . '{5}' . self::HEXDIG . '{1,4}:' . self::HOST_IPV4_EMBEDDED . '\\]$'
 
const HOST_IPV6_EMBEDDED_IPV4_SHORT
 
const HOST_IPV6_EMBEDDED_IPV4 = self::HOST_IPV6_EMBEDDED_IPV4_SHORT . '|' . self::HOST_IPV6_EMBEDDED_IPV4_LONG
 
const HOST_IPV6 = self::HOST_IPV6_LONG . '|' . self::HOST_IPV6_SHORT . '|' . self::HOST_IPV6_EMBEDDED_IPV4
 
const HOST = '#' . self::HOST_IPV4 . '|' . self::HOST_REG_NAME . '|' . self::HOST_IPV6 . '#'
 
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 . '|\\?|\\#)+$#'
 

Detailed Description

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:

  • Notice the restrictions on baseuri-subdelims.
  • We require a schema and an authority to be present.
  • If any part is located and it is invalid an exception will be thrown instead of just omiting it.
  • IPv6 is now supported.
  • The IPv6 conforms to https://datatracker.ietf.org/doc/html/rfc4291#section-2.2.

Definition at line 34 of file URI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Data\URI::__construct ( string  $uri_string)

Definition at line 111 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().

112  {
113  $this->schema = $this->digestSchema(parse_url($uri_string, PHP_URL_SCHEME));
114  $this->host = $this->digestHost(parse_url($uri_string, PHP_URL_HOST));
115  $this->port = $this->digestPort(parse_url($uri_string, PHP_URL_PORT));
116  $this->path = $this->digestPath(parse_url($uri_string, PHP_URL_PATH));
117  $this->query = $this->digestQuery(parse_url($uri_string, PHP_URL_QUERY));
118  $this->fragment = $this->digestFragment(parse_url($uri_string, PHP_URL_FRAGMENT));
119  }
digestQuery(string $query=null)
Check query formating.
Definition: URI.php:163
digestHost(string $host)
Check host formating.
Definition: URI.php:132
digestPath(string $path=null)
Check path formating.
Definition: URI.php:148
digestPort(int $port=null)
Check port formating.
Definition: URI.php:140
digestSchema(string $schema)
Check schema formating.
Definition: URI.php:124
digestFragment(string $fragment=null)
Check fragment formating.
Definition: URI.php:178
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ILIAS\Data\URI::__toString ( )

Definition at line 337 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().

Referenced by ILIAS\UI\Implementation\Component\Link\Bulky\__construct(), and ILIAS\UI\Implementation\Component\Prompt\State\State\withRedirect().

337  : string
338  {
339  $uri = $this->getBaseURI();
340  $query = $this->getQuery();
341  if ($query) {
342  $uri .= '?' . $query;
343  }
344  $fragment = $this->getFragment();
345  if ($fragment) {
346  $uri .= '#' . $fragment;
347  }
348  return $uri;
349  }
string $fragment
Definition: URI.php:109
getBaseURI()
Get a well-formed URI consisting only of schema, authority and port.
Definition: URI.php:328
getFragment()
Definition: URI.php:308
string $query
Definition: URI.php:108
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkCorrectFormatOrThrow()

ILIAS\Data\URI::checkCorrectFormatOrThrow ( string  $regexp,
string  $string 
)
protected

Check wether a string fits a regexp.

Return it, if so, throw otherwise.

Definition at line 191 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().

191  : string
192  {
193  if (preg_match($regexp, $string) === 1) {
194  return $string;
195  }
196  throw new \InvalidArgumentException('ill-formated component "' . $string . '" expected "' . $regexp . '"');
197  }
+ Here is the caller graph for this function:

◆ digestFragment()

ILIAS\Data\URI::digestFragment ( string  $fragment = null)
protected

Check fragment formating.

Return it in case of success.

Definition at line 178 of file URI.php.

References ILIAS\Data\URI\checkCorrectFormatOrThrow().

Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withFragment().

178  : ?string
179  {
180  if ($fragment === null) {
181  return null;
182  }
183  return $this->checkCorrectFormatOrThrow(self::FRAGMENT, $fragment);
184  }
string $fragment
Definition: URI.php:109
checkCorrectFormatOrThrow(string $regexp, string $string)
Check wether a string fits a regexp.
Definition: URI.php:191
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ digestHost()

ILIAS\Data\URI::digestHost ( string  $host)
protected

Check host formating.

Return it in case of success.

Definition at line 132 of file URI.php.

References ILIAS\Data\URI\checkCorrectFormatOrThrow().

Referenced by ILIAS\Data\URI\__construct(), ILIAS\Data\URI\withAuthority(), and ILIAS\Data\URI\withHost().

132  : string
133  {
134  return $this->checkCorrectFormatOrThrow(self::HOST, $host);
135  }
checkCorrectFormatOrThrow(string $regexp, string $string)
Check wether a string fits a regexp.
Definition: URI.php:191
string $host
Definition: URI.php:105
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ digestPath()

ILIAS\Data\URI::digestPath ( string  $path = null)
protected

Check path formating.

Return it in case of success.

Definition at line 148 of file URI.php.

References ILIAS\Data\URI\$path, and ILIAS\Data\URI\checkCorrectFormatOrThrow().

Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withPath().

148  : ?string
149  {
150  if ($path === null) {
151  return null;
152  }
153  $path = trim($this->checkCorrectFormatOrThrow(self::PATH, $path), self::PATH_DELIM);
154  if ($path === '') {
155  $path = null;
156  }
157  return $path;
158  }
string $path
Definition: URI.php:107
checkCorrectFormatOrThrow(string $regexp, string $string)
Check wether a string fits a regexp.
Definition: URI.php:191
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ digestPort()

ILIAS\Data\URI::digestPort ( int  $port = null)
protected

Check port formating.

Return it in case of success.

Definition at line 140 of file URI.php.

Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withPort().

140  : ?int
141  {
142  return $port ?? null;
143  }
int $port
Definition: URI.php:106
+ Here is the caller graph for this function:

◆ digestQuery()

ILIAS\Data\URI::digestQuery ( string  $query = null)
protected

Check query formating.

Return it in case of success.

Definition at line 163 of file URI.php.

References $q, ILIAS\Data\URI\$query, and ILIAS\Data\URI\checkCorrectFormatOrThrow().

Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withQuery().

163  : ?string
164  {
165  if ($query === null) {
166  return null;
167  }
168  $qparts = explode('&', $query);
169  foreach ($qparts as $q) {
170  $this->checkCorrectFormatOrThrow(self::QUERY, $q);
171  }
172  return $query;
173  }
checkCorrectFormatOrThrow(string $regexp, string $string)
Check wether a string fits a regexp.
Definition: URI.php:191
$q
Definition: shib_logout.php:18
string $query
Definition: URI.php:108
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ digestSchema()

ILIAS\Data\URI::digestSchema ( string  $schema)
protected

Check schema formating.

Return it in case of success.

Definition at line 124 of file URI.php.

References ILIAS\Data\URI\checkCorrectFormatOrThrow().

Referenced by ILIAS\Data\URI\__construct(), and ILIAS\Data\URI\withSchema().

124  : string
125  {
126  return $this->checkCorrectFormatOrThrow(self::SCHEMA, $schema);
127  }
checkCorrectFormatOrThrow(string $regexp, string $string)
Check wether a string fits a regexp.
Definition: URI.php:191
string $schema
Definition: URI.php:104
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAuthority()

ILIAS\Data\URI::getAuthority ( )

Definition at line 215 of file URI.php.

References ILIAS\Data\URI\$port, ILIAS\Data\URI\getHost(), and ILIAS\Data\URI\getPort().

Referenced by ILIAS\Data\URI\getBaseURI().

215  : string
216  {
217  $port = $this->getPort();
218  if ($port === null) {
219  return $this->getHost();
220  }
221  return $this->getHost() . ':' . $port;
222  }
int $port
Definition: URI.php:106
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBaseURI()

ILIAS\Data\URI::getBaseURI ( )

Get a well-formed URI consisting only of schema, authority and port.

Definition at line 328 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().

328  : string
329  {
330  $path = $this->getPath();
331  if ($path === null) {
332  return $this->getSchema() . '://' . $this->getAuthority();
333  }
334  return $this->getSchema() . '://' . $this->getAuthority() . '/' . $path;
335  }
string $path
Definition: URI.php:107
getAuthority()
Definition: URI.php:215
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFragment()

ILIAS\Data\URI::getFragment ( )

Definition at line 308 of file URI.php.

References ILIAS\Data\URI\$fragment.

Referenced by ILIAS\Data\URI\__toString().

308  : ?string
309  {
310  return $this->fragment;
311  }
string $fragment
Definition: URI.php:109
+ Here is the caller graph for this function:

◆ getHost()

ILIAS\Data\URI::getHost ( )

Definition at line 260 of file URI.php.

References ILIAS\Data\URI\$host.

Referenced by ILIAS\Data\URI\getAuthority().

260  : string
261  {
262  return $this->host;
263  }
string $host
Definition: URI.php:105
+ Here is the caller graph for this function:

◆ getParameter()

ILIAS\Data\URI::getParameter ( string  $param)

Get the value of the given parameter (or null)

Returns
mixed|null

Definition at line 368 of file URI.php.

References $param, $params, and ILIAS\Data\URI\getParameters().

369  {
370  $params = $this->getParameters();
371 
372  return $params[$param] ?? null;
373  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
getParameters()
Get all parameters as associative array.
Definition: URI.php:354
$param
Definition: xapitoken.php:44
+ Here is the call graph for this function:

◆ getParameters()

ILIAS\Data\URI::getParameters ( )

Get all parameters as associative array.

Definition at line 354 of file URI.php.

References $params, and ILIAS\Data\URI\getQuery().

Referenced by ILIAS\Data\URI\getParameter(), and ILIAS\Data\URI\withParameter().

354  : array
355  {
356  $params = [];
357  $query = $this->getQuery();
358  if (!is_null($query)) {
359  parse_str($query, $params);
360  }
361  return $params;
362  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
string $query
Definition: URI.php:108
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPath()

ILIAS\Data\URI::getPath ( )

Definition at line 276 of file URI.php.

References ILIAS\Data\URI\$path.

Referenced by ILIAS\Data\URI\getBaseURI(), and ILIAS\StaticURL\Handler\HandlerService\performRedirect().

276  : ?string
277  {
278  return $this->path;
279  }
string $path
Definition: URI.php:107
+ Here is the caller graph for this function:

◆ getPort()

ILIAS\Data\URI::getPort ( )

Definition at line 244 of file URI.php.

References ILIAS\Data\URI\$port.

Referenced by ILIAS\Data\URI\getAuthority().

244  : ?int
245  {
246  return $this->port;
247  }
int $port
Definition: URI.php:106
+ Here is the caller graph for this function:

◆ getQuery()

ILIAS\Data\URI::getQuery ( )

Definition at line 292 of file URI.php.

References ILIAS\Data\URI\$query.

Referenced by ILIAS\Data\URI\__toString(), and ILIAS\Data\URI\getParameters().

292  : ?string
293  {
294  return $this->query;
295  }
string $query
Definition: URI.php:108
+ Here is the caller graph for this function:

◆ getSchema()

ILIAS\Data\URI::getSchema ( )

Definition at line 199 of file URI.php.

References ILIAS\Data\URI\$schema.

Referenced by ILIAS\Data\URI\getBaseURI().

199  : string
200  {
201  return $this->schema;
202  }
string $schema
Definition: URI.php:104
+ Here is the caller graph for this function:

◆ withAuthority()

ILIAS\Data\URI::withAuthority ( string  $authority)

Get URI with modified authority.

Definition at line 227 of file URI.php.

References ILIAS\Data\URI\$host, $parts, ILIAS\Data\URI\$port, ILIAS\Data\URI\checkCorrectFormatOrThrow(), ILIAS\Data\URI\digestHost(), and ILIAS\Repository\int().

227  : URI
228  {
229  $parts = explode(':', $authority);
230  if (count($parts) > 2) {
231  throw new \InvalidArgumentException('ill-formated component ' . $authority);
232  }
233  $host = $this->digestHost($parts[0]);
234  $port = null;
235  if (array_key_exists(1, $parts)) {
236  $port = (int) $this->checkCorrectFormatOrThrow(self::PORT, (string) $parts[1]);
237  }
238  $other = clone $this;
239  $other->host = $host;
240  $other->port = $port;
241  return $other;
242  }
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61
digestHost(string $host)
Check host formating.
Definition: URI.php:132
checkCorrectFormatOrThrow(string $regexp, string $string)
Check wether a string fits a regexp.
Definition: URI.php:191
string $host
Definition: URI.php:105
int $port
Definition: URI.php:106
+ Here is the call graph for this function:

◆ withFragment()

ILIAS\Data\URI::withFragment ( string  $fragment = null)

Get URI with modified fragment.

Definition at line 316 of file URI.php.

References ILIAS\Data\URI\$fragment, and ILIAS\Data\URI\digestFragment().

316  : URI
317  {
319  $other = clone $this;
320  $other->fragment = $fragment;
321  return $other;
322  }
string $fragment
Definition: URI.php:109
digestFragment(string $fragment=null)
Check fragment formating.
Definition: URI.php:178
+ Here is the call graph for this function:

◆ withHost()

ILIAS\Data\URI::withHost ( string  $host)

Get URI with modified host.

Definition at line 268 of file URI.php.

References ILIAS\Data\URI\$host, and ILIAS\Data\URI\digestHost().

268  : URI
269  {
270  $host = $this->digestHost($host);
271  $other = clone $this;
272  $other->host = $host;
273  return $other;
274  }
digestHost(string $host)
Check host formating.
Definition: URI.php:132
string $host
Definition: URI.php:105
+ Here is the call graph for this function:

◆ withParameter()

ILIAS\Data\URI::withParameter ( string  $key,
  $value 
)

◆ withParameters()

ILIAS\Data\URI::withParameters ( array  $parameters)

Get URI with modified parameters.

Definition at line 378 of file URI.php.

References ILIAS\Data\URI\withQuery().

Referenced by ILIAS\Data\URI\withParameter().

378  : URI
379  {
380  return $this->withQuery(
381  http_build_query($parameters)
382  );
383  }
withQuery(string $query=null)
Get URI with modified query.
Definition: URI.php:300
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withPath()

ILIAS\Data\URI::withPath ( string  $path = null)

Get URI with modified path.

Definition at line 284 of file URI.php.

References ILIAS\Data\URI\$path, and ILIAS\Data\URI\digestPath().

284  : URI
285  {
286  $path = $this->digestPath($path);
287  $other = clone $this;
288  $other->path = $path;
289  return $other;
290  }
string $path
Definition: URI.php:107
digestPath(string $path=null)
Check path formating.
Definition: URI.php:148
+ Here is the call graph for this function:

◆ withPort()

ILIAS\Data\URI::withPort ( int  $port = null)

Get URI with modified port.

Definition at line 252 of file URI.php.

References ILIAS\Data\URI\$port, and ILIAS\Data\URI\digestPort().

252  : URI
253  {
254  $port = $this->digestPort($port);
255  $other = clone $this;
256  $other->port = $port;
257  return $other;
258  }
digestPort(int $port=null)
Check port formating.
Definition: URI.php:140
int $port
Definition: URI.php:106
+ Here is the call graph for this function:

◆ withQuery()

ILIAS\Data\URI::withQuery ( string  $query = null)

Get URI with modified query.

Definition at line 300 of file URI.php.

References ILIAS\Data\URI\$query, and ILIAS\Data\URI\digestQuery().

Referenced by ILIAS\Data\URI\withParameters().

300  : URI
301  {
302  $query = $this->digestQuery($query);
303  $other = clone $this;
304  $other->query = $query;
305  return $other;
306  }
digestQuery(string $query=null)
Check query formating.
Definition: URI.php:163
string $query
Definition: URI.php:108
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withSchema()

ILIAS\Data\URI::withSchema ( string  $schema)

Get URI with modified schema.

Definition at line 207 of file URI.php.

References ILIAS\Data\URI\$schema, and ILIAS\Data\URI\digestSchema().

207  : URI
208  {
209  $shema = $this->digestSchema($schema);
210  $other = clone $this;
211  $other->schema = $schema;
212  return $other;
213  }
string $schema
Definition: URI.php:104
digestSchema(string $schema)
Check schema formating.
Definition: URI.php:124
+ Here is the call graph for this function:

Field Documentation

◆ $fragment

string ILIAS\Data\URI::$fragment
protected

◆ $host

string ILIAS\Data\URI::$host
protected

◆ $path

string ILIAS\Data\URI::$path
protected

◆ $port

int ILIAS\Data\URI::$port
protected

◆ $query

string ILIAS\Data\URI::$query
protected

◆ $schema

string ILIAS\Data\URI::$schema
protected

Definition at line 104 of file URI.php.

Referenced by ILIAS\Data\URI\getSchema(), and ILIAS\Data\URI\withSchema().

◆ ALPHA

const ILIAS\Data\URI::ALPHA = '[A-Za-z]'
private

Relevant character-groups as defined in RFC 3986 Appendix 1.

Definition at line 41 of file URI.php.

◆ ALPHA_DIGIT

const ILIAS\Data\URI::ALPHA_DIGIT = '[A-Za-z0-9]'
private

Definition at line 43 of file URI.php.

◆ BASEURI_PCHAR

const ILIAS\Data\URI::BASEURI_PCHAR = self::UNRESERVED . '|' . self::BASEURI_SUBDELIMS . '|' . self::PCTENCODED . '|:|@'
private

Definition at line 65 of file URI.php.

◆ BASEURI_SUBDELIMS

const ILIAS\Data\URI::BASEURI_SUBDELIMS = '[\\$,;&\'\\*]'
private

subdelims without jsf**k characters +!() and =

Definition at line 59 of file URI.php.

◆ DIGIT

const ILIAS\Data\URI::DIGIT = '[0-9]'
private

Definition at line 42 of file URI.php.

◆ DOMAIN_LABEL

const ILIAS\Data\URI::DOMAIN_LABEL = self::ALPHA_DIGIT . '((' . self::UNRESERVED_NO_DOT . '|' . self::PCTENCODED . '|' . self::BASEURI_SUBDELIMS . ')*' . self::ALPHA_DIGIT . ')*'
private

Definition at line 68 of file URI.php.

◆ FRAGMENT

const ILIAS\Data\URI::FRAGMENT = '#^(' . self::PCHAR . '|' . self::PATH_DELIM . '|\\?|\\#)+$#'
private

Definition at line 102 of file URI.php.

◆ HEXDIG

const ILIAS\Data\URI::HEXDIG = '[0-9A-Fa-f]'
private

Definition at line 44 of file URI.php.

◆ HOST

const ILIAS\Data\URI::HOST = '#' . self::HOST_IPV4 . '|' . self::HOST_REG_NAME . '|' . self::HOST_IPV6 . '#'
private

Definition at line 98 of file URI.php.

◆ HOST_IPV4

const ILIAS\Data\URI::HOST_IPV4 = '^' . self::HOST_IPV4_EMBEDDED . '$'
private

Definition at line 71 of file URI.php.

◆ HOST_IPV4_EMBEDDED

const ILIAS\Data\URI::HOST_IPV4_EMBEDDED = '(' . self::DIGIT . '{1,3})(\\.' . self::DIGIT . '{1,3}){3}'
private

Definition at line 70 of file URI.php.

◆ HOST_IPV6

const ILIAS\Data\URI::HOST_IPV6 = self::HOST_IPV6_LONG . '|' . self::HOST_IPV6_SHORT . '|' . self::HOST_IPV6_EMBEDDED_IPV4
private

Definition at line 97 of file URI.php.

◆ HOST_IPV6_EMBEDDED_IPV4

const ILIAS\Data\URI::HOST_IPV6_EMBEDDED_IPV4 = self::HOST_IPV6_EMBEDDED_IPV4_SHORT . '|' . self::HOST_IPV6_EMBEDDED_IPV4_LONG
private

Definition at line 95 of file URI.php.

◆ HOST_IPV6_EMBEDDED_IPV4_LONG

const ILIAS\Data\URI::HOST_IPV6_EMBEDDED_IPV4_LONG = '^\\[' . self::IPV6_COUNT_COLONS . '{5}' . self::HEXDIG . '{1,4}:' . self::HOST_IPV4_EMBEDDED . '\\]$'
private

Definition at line 87 of file URI.php.

◆ HOST_IPV6_EMBEDDED_IPV4_SHORT

const ILIAS\Data\URI::HOST_IPV6_EMBEDDED_IPV4_SHORT
private
Initial value:
= '^\\[(?=' . self::IPV6_COLONS_BETWEEN . '{2,6}' . self::HOST_IPV4_EMBEDDED . '\\]$)' .
self::IPV6_LEFT_SHORT . '::' .
'(' . self::HEXDIG . '{1,4}|(' . self::HEXDIG . '{1,4}:)*' . self::HEXDIG . '{0,4})?' . self::HOST_IPV4_EMBEDDED . '\\]$'

Definition at line 89 of file URI.php.

◆ HOST_IPV6_LONG

const ILIAS\Data\URI::HOST_IPV6_LONG = '^\\[' . self::IPV6_COUNT_COLONS . '{7}' . self::HEXDIG . '{1,4}\\]$'
private

Definition at line 79 of file URI.php.

◆ HOST_IPV6_SHORT

const ILIAS\Data\URI::HOST_IPV6_SHORT
private
Initial value:
= '^\\[(?=' . self::IPV6_COLONS_BETWEEN . '{2,7}\\]$)' .
self::IPV6_LEFT_SHORT . '::' .
'(' . self::HEXDIG . '{1,4}|(' . self::HEXDIG . '{1,4}:)*' . self::HEXDIG . '{1,4})?\\]$'

Definition at line 81 of file URI.php.

◆ HOST_REG_NAME

const ILIAS\Data\URI::HOST_REG_NAME = '^' . self::DOMAIN_LABEL . '(\\.' . self::DOMAIN_LABEL . ')*$'
private

Definition at line 69 of file URI.php.

◆ IPV6_COLONS_BETWEEN

const ILIAS\Data\URI::IPV6_COLONS_BETWEEN = '(' . self::HEXDIG . '{0,4}:' . self::HEXDIG . '{0,4})'
private

Definition at line 74 of file URI.php.

◆ IPV6_COUNT_COLONS

const ILIAS\Data\URI::IPV6_COUNT_COLONS = '(' . self::HEXDIG . '{1,4}:)'
private

Definition at line 73 of file URI.php.

◆ IPV6_LEFT_SHORT

const ILIAS\Data\URI::IPV6_LEFT_SHORT = '(' . self::HEXDIG . '{1,4}|' . self::HEXDIG . '{1,4}(:' . self::HEXDIG . '{1,4})*)?'
private

Definition at line 75 of file URI.php.

◆ PATH

const ILIAS\Data\URI::PATH = '#^(?!//)(?!:)(' . self::PCHAR . '|' . self::PATH_DELIM . ')+$#'
private

Definition at line 100 of file URI.php.

◆ PATH_DELIM

const ILIAS\Data\URI::PATH_DELIM = '/'
private

Definition at line 36 of file URI.php.

◆ PCHAR

const ILIAS\Data\URI::PCHAR = self::UNRESERVED . '|' . self::SUBDELIMS . '|' . self::PCTENCODED . '|:|@'
private

Definition at line 64 of file URI.php.

◆ PCTENCODED

const ILIAS\Data\URI::PCTENCODED = '%' . self::HEXDIG . self::HEXDIG
private

Definition at line 45 of file URI.php.

◆ PIMP

const ILIAS\Data\URI::PIMP = '[\\+\\-\\.]'
private

point|minus|plus to be used in schema.

Definition at line 49 of file URI.php.

◆ PORT

const ILIAS\Data\URI::PORT = '#^' . self::DIGIT . '+$#'
private

Definition at line 99 of file URI.php.

◆ QUERY

const ILIAS\Data\URI::QUERY = '#^(' . self::PCHAR . '|' . self::PATH_DELIM . '|\\?)+$#'
private

Definition at line 101 of file URI.php.

◆ SCHEMA

const ILIAS\Data\URI::SCHEMA = '#^' . self::ALPHA . '(' . self::ALPHA_DIGIT . '|' . self::PIMP . ')*$#'
private

Definition at line 67 of file URI.php.

◆ SUBDELIMS

const ILIAS\Data\URI::SUBDELIMS = '[\\$,;=!&\'\\(\\)\\*\\+]'
private

valid subdelims according to RFC 3986 Appendix 1: "!" "$" "&" "'" "(" ")" "*" "+" "," ";" "="

Definition at line 55 of file URI.php.

◆ UNRESERVED

const ILIAS\Data\URI::UNRESERVED = self::ALPHA_DIGIT . '|[\\-\\._~]'
private

Definition at line 61 of file URI.php.

◆ UNRESERVED_NO_DOT

const ILIAS\Data\URI::UNRESERVED_NO_DOT = self::ALPHA_DIGIT . '|[\\-_~]'
private

Definition at line 62 of file URI.php.


The documentation for this class was generated from the following file: