19declare(strict_types=1);
37 $db = $environment->getResource(
Setup\Environment::RESOURCE_DATABASE);
49 $chatAdministration = current($chatAdministrations);
52 $settings = $chat_admin->loadGeneralSettings();
54 if (count($settings) > 0) {
55 $storage->storeConfigText(
57 $settings[
'address'] ??
'',
58 'IP-Address/FQN of Chat Server.'
60 $storage->storeConfigText(
62 (
string) ($settings[
'port'] ??
''),
63 'Port of the chat server.'
65 $storage->storeConfigText(
67 $settings[
'sub_directory'] ??
'',
68 'http(s)://[IP/Domain]/[SUB_DIRECTORY]'
71 $storage->storeConfigText(
73 $settings[
'protocol'] ??
'',
74 'Protocol used for connection (http/https).'
77 if (isset($settings[
'protocol']) && $settings[
'protocol'] ===
'https') {
79 Setup\Metrics\Metric::STABILITY_CONFIG,
80 Setup\Metrics\Metric::TYPE_TEXT,
81 $settings[
'cert'] ??
''
84 Setup\Metrics\Metric::STABILITY_CONFIG,
85 Setup\Metrics\Metric::TYPE_TEXT,
86 $settings[
'key'] ??
''
89 Setup\Metrics\Metric::STABILITY_CONFIG,
90 Setup\Metrics\Metric::TYPE_TEXT,
91 $settings[
'dhparam'] ??
''
94 Setup\Metrics\Metric::STABILITY_CONFIG,
95 Setup\Metrics\Metric::TYPE_COLLECTION,
99 'dhparam' => $dhparam,
101 'Holds parameters for https.'
103 $storage->store(
'https', $https);
106 $storage->storeConfigText(
108 (
string) ($settings[
'log'] ??
''),
109 "Absolute server path to the chat server's log file."
111 $storage->storeConfigText(
113 $settings[
'log_level'] ??
'',
114 'Possible values are emerg, alert, crit error, warning, notice, info, debug, silly.'
116 $storage->storeConfigText(
118 $settings[
'error_log'] ??
'',
119 "Absolute server path to the chat server's error log file."
122 if (isset($settings[
'ilias_proxy']) && $settings[
'ilias_proxy']) {
124 Setup\Metrics\Metric::STABILITY_CONFIG,
125 Setup\Metrics\Metric::TYPE_TEXT,
126 $settings[
'ilias_url'] ??
''
129 Setup\Metrics\Metric::STABILITY_CONFIG,
130 Setup\Metrics\Metric::TYPE_COLLECTION,
132 'ilias_url' => $ilias_url
134 'Holds proxy url if ILIAS proxy is enabled.'
136 $storage->store(
'ilias_proxy', $ilias_proxy);
138 $storage->storeConfigBool(
141 'Holds proxy url if ILIAS proxy is enabled.'
145 if (isset($settings[
'client_proxy']) && $settings[
'client_proxy']) {
147 Setup\Metrics\Metric::STABILITY_CONFIG,
148 Setup\Metrics\Metric::TYPE_TEXT,
149 $settings[
'client_url'] ??
''
152 Setup\Metrics\Metric::STABILITY_CONFIG,
153 Setup\Metrics\Metric::TYPE_COLLECTION,
155 'client_url' => $client_url
157 'Holds proxy url if client proxy is enabled.'
159 $storage->store(
'client_proxy', $client_proxy);
161 $storage->storeConfigBool(
164 'Holds proxy url if client proxy is enabled.'
168 if (isset($settings[
'deletion_mode']) && $settings[
'deletion_mode']) {
170 Setup\Metrics\Metric::STABILITY_CONFIG,
171 Setup\Metrics\Metric::TYPE_TEXT,
172 $settings[
'deletion_unit'] ??
''
175 Setup\Metrics\Metric::STABILITY_CONFIG,
176 Setup\Metrics\Metric::TYPE_TEXT,
177 (
string) ($settings[
'deletion_value'] ??
'')
180 Setup\Metrics\Metric::STABILITY_CONFIG,
181 Setup\Metrics\Metric::TYPE_TEXT,
182 $settings[
'deletion_time'] ??
''
185 Setup\Metrics\Metric::STABILITY_CONFIG,
186 Setup\Metrics\Metric::TYPE_COLLECTION,
188 'deletion_unit' => $deletion_unit,
189 'deletion_value' => $deletion_value,
190 'deletion_time' => $deletion_time,
192 'Holds information about deletion process.'
Customizing of pimple-DIC for ILIAS.
A metric is something we can measure about the system.
collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage)
getTentativePreconditions(Setup\Environment $environment)
static _getObjectsByType(string $obj_type="", ?int $owner=null)
An environment holds resources to be used in the setup process.
Storage is simple key/value store without further schema definition.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...