ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.shibServerData.php
Go to the documentation of this file.
1 <?php
24 {
25  protected static ?shibServerData $server_cache;
26 
31  protected function __construct(array $data)
32  {
33  $shib_config = shibConfig::getInstance();
34  foreach (array_keys(get_class_vars(shibConfig::class)) as $field) {
35  $str = $shib_config->getValueByKey($field);
36  if ($str !== null) {
37  $this->{$field} = $data[$str] ?? '';
38  }
39  }
40  }
41 
42  public static function getInstance(): shibServerData
43  {
44  if (!isset(self::$server_cache)) {
45  self::$server_cache = new self($_SERVER);
46  }
47 
48  return self::$server_cache;
49  }
50 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static shibServerData $server_cache
static getInstance()
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(array $data)
MagicMethodsValidityInspection PhpMissingParentConstructorInspection