ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.shibServerData.php
Go to the documentation of this file.
1<?php
2require_once('./Services/AuthShibboleth/classes/Config/class.shibConfig.php');
3
10{
11
15 protected static $cache = null;
16
17
21 protected function __construct($data)
22 {
23 $shibConfig = shibConfig::getInstance();
24 foreach (array_keys(get_class_vars('shibConfig')) as $field) {
25 $str = $shibConfig->getValueByKey($field);
26 if ($str !== null) {
27 $this->{$field} = $data[$str];
28 }
29 }
30 }
31
32
36 public static function getInstance()
37 {
38 if (!isset(self::$cache)) {
39 self::$cache = new self($_SERVER);
40 }
41
42 return self::$cache;
43 }
44}
An exception for terminatinating execution or to throw for unit testing.
Class shibConfig.
static getInstance()
Class shibServerData.
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
$data
Definition: storeScorm.php:23