ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DataService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace XapiProxy;
22
24{
25 public static function initIlias(string $client_id): void
26 {
27 define("CLIENT_ID", $client_id);
28 // see: commit 2844b5d7bfffe08728ecb54c21acf00fd65d5969
29 //
30 // or set clientId Cookie and Context class ilContextScorm: supportsPersistentSessions = true
31 // or set clientId Cookie support own Context with supportsPersistentSessions = true
32 $_GET['client_id'] = $client_id;
33
34 // Im Plugin war das auskommentiert(?)
35 // define('IL_COOKIE_HTTPONLY', true); // Default Value
36 // define('IL_COOKIE_EXPIRE', 0);
37 // define('IL_COOKIE_PATH', '/');
38 // define('IL_COOKIE_DOMAIN', '');
41 // Remember original values
42 // $_ORG_SERVER = array(
43 // 'HTTP_HOST' => $_SERVER['HTTP_HOST'],
44 // 'REQUEST_URI' => $_SERVER['REQUEST_URI'],
45 // 'PHP_SELF' => $_SERVER['PHP_SELF'],
46 // );
47 // // Overwrite $_SERVER entries which would confuse ILIAS during initialisation
48 // $_SERVER['REQUEST_URI'] = '';
49 // $_SERVER['PHP_SELF'] = '/index.php';
50 // $_SERVER['HTTP_HOST'] = self::getIniHost();
51 // require_once "./components/ILIAS/Utilities/classes/class.ilUtil.php";
52 // //ilInitialisation::initIliasIniFile();
53 // ilInitialisation::initClientIniFile();
54 // ilInitialisation::initDatabase();
55
56 // // Restore original, since this could lead to bad side-effects otherwise
57 // $_SERVER['HTTP_HOST'] = $_ORG_SERVER['HTTP_HOST'];
58 // $_SERVER['REQUEST_URI'] = $_ORG_SERVER['REQUEST_URI'];
59 // $_SERVER['PHP_SELF'] = $_ORG_SERVER['PHP_SELF'];
60 // ilInitialisation::initLog();//UK
61 }
62}
63
65{
71 public static function initGlobal(
72 string $a_name,
73 $a_class,
74 ?string $a_source_file = null,
75 ?bool $destroy_existing = false
76 ): void {
77 parent::initGlobal($a_name, $a_class, $a_source_file, $destroy_existing);
78 }
79
86 public static function initDatabase(): void
87 {
88 if (!isset($GLOBALS['ilDB'])) {
89 parent::initGlobal("ilBench", "ilBenchmark", "./components/ILIAS/Utilities/classes/class.ilBenchmark.php");
90 parent::initDatabase();
91 }
92 }
93
100 public static function initIliasIniFile(): void
101 {
102 if (!isset($GLOBALS['ilIliasIniFile'])) {
103 parent::initIliasIniFile();
104 }
105 }
106
113 public static function initClientIniFile(): void
114 {
115 if (!isset($GLOBALS['initClientIniFile'])) {
116 parent::initClientIniFile();
117 }
118 }
119
120 //UK
121 public static function initLog(): void
122 {
123 if (!isset($GLOBALS['ilLog'])) {
124 parent::initLog();
125 parent::initGlobal("ilAppEventHandler", "ilAppEventHandler", "./components/ILIAS/EventHandling/classes/class.ilAppEventHandler.php");
126 }
127 }
128}
static initIlias(string $client_id)
Definition: DataService.php:25
static initDatabase()
Function: initDatabase() Derive from protected to public...
Definition: DataService.php:86
static initIliasIniFile()
Function: initIliasIniFile() Derive from protected to public...
static initLog()
Init log instance.
static initClientIniFile()
Function: initClientIniFile() Derive from protected to public...
static initGlobal(string $a_name, $a_class, ?string $a_source_file=null, ?bool $destroy_existing=false)
Function; initGlobal($a_name, $a_class, $a_source_file) Derive from protected to public....
Definition: DataService.php:71
const CONTEXT_SCORM
static init(string $a_type)
Init context by type.
ILIAS Initialisation Utility Class perform basic setup: init database handler, load configuration fil...
static initILIAS()
ilias initialisation
static initGlobal(string $a_name, $a_class, ?string $a_source_file=null, ?bool $destroy_existing=false)
$_GET['cmd']
Definition: lti.php:26
$client_id
Definition: ltiauth.php:67
$GLOBALS["DIC"]
Definition: wac.php:54