ILIAS  release_7 Revision v7.30-3-g800a261c036
class.shibServerData.php
Go to the documentation of this file.
1<?php
24{
28 protected static $server_cache;
29
34 protected function __construct(array $data)
35 {
36 $shib_config = shibConfig::getInstance();
37 foreach (array_keys(get_class_vars(shibConfig::class)) as $field) {
38 $str = $shib_config->getValueByKey($field);
39 if ($str !== null) {
40 $this->{$field} = $data[$str] ?? '';
41 }
42 }
43 }
44
45 public static function getInstance() : \shibConfig
46 {
47 if (!isset(self::$server_cache)) {
48 self::$server_cache = new self($_SERVER);
49 }
50
52 }
53}
An exception for terminatinating execution or to throw for unit testing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(array $data)
@noinspection MagicMethodsValidityInspection @noinspection PhpMissingParentConstructorInspection
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
$data
Definition: storeScorm.php:23