ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
$data
Definition: bench.php:6