ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.shibServerData.php
Go to the documentation of this file.
1<?php
2require_once('./Services/AuthShibboleth/classes/Config/class.shibConfig.php');
3
10
14 protected static $cache = null;
15
16
20 protected function __construct($data) {
21 $shibConfig = shibConfig::getInstance();
22 foreach (array_keys(get_class_vars('shibConfig')) as $field) {
23 $str = $shibConfig->getValueByKey($field);
24 if ($str !== null) {
25 $this->{$field} = $data[$str];
26 }
27 }
28 }
29
30
34 public static function getInstance() {
35 if (!isset(self::$cache)) {
36 self::$cache = new self($_SERVER);
37 }
38
39 return self::$cache;
40 }
41}
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']