1 <?php declare(strict_types=1);
58 throw new \LogicException(
"Not yet implemented.");
66 $levels = self::$LOG_LEVELS;
67 $intervals = self::$INTERVALS;
69 return $this->refinery->custom()->transformation(
function (
$data) use ($levels, $intervals) {
71 return new Setup\NullConfig();
75 if (isset(
$data[
'https']) && count(
$data[
'https']) > 0) {
79 $deletion_interval =
false;
80 if (isset(
$data[
'deletion_interval']) && count(
$data[
'deletion_interval']) > 0) {
81 $deletion_interval =
true;
85 if (isset(
$data[
'ilias_proxy']) && count(
$data[
'ilias_proxy']) > 0) {
89 $client_proxy =
false;
90 if (isset(
$data[
'client_proxy']) && count(
$data[
'client_proxy']) > 0) {
94 if (!is_null(
$data[
'port']) && (
int)
$data[
'port'] < self::PORT_MIN || (
int)
$data[
'port'] > self::PORT_MAX) {
96 $data[
'port'] .
' is not a valid value for port. Please check your config file.' 100 if (
$data[
'log'] !=
'') {
101 if (!in_array(
$data[
'log_level'], $levels)) {
103 $data[
'log_level'] .
' is not a valid value for log_level. Please check your config file.' 108 if ($deletion_interval) {
109 if (!in_array(
$data[
'deletion_interval'][
'deletion_unit'], $intervals)) {
111 $data[
'deletion_interval'][
'deletion_unit'] .
' is not a valid value for deletion_unit. Please check your config file.' 114 if (!is_numeric(
$data[
'deletion_interval'][
'deletion_value'])) {
116 $data[
'deletion_interval'][
'deletion_value'] .
' is not a valid value for deletion_value. Please check your config file.' 119 if (!preg_match_all(
'/([01][0-9]|[2][0-3]):[0-5][0-9]/',
$data[
'deletion_interval'][
'deletion_time'])) {
121 $data[
'deletion_interval'][
'deletion_time'] .
' is not a valid value for deletion_time. Please check your config file.' 126 return new \ilChatroomSetupConfig(
127 $data[
'address'] ??
'',
128 (
int)
$data[
'port'] ?? 0,
129 $data[
'sub_directory'] ??
'',
131 $data[
'https'][
'cert'] ??
'',
132 $data[
'https'][
'key'] ??
'',
133 $data[
'https'][
'dhparam'] ??
'',
135 $data[
'log_level'] ??
'',
136 $data[
'error_log'] ??
'',
138 $data[
'ilias_proxy'][
'ilias_url'] ??
'',
140 $data[
'client_proxy'][
'client_url'] ??
'',
142 $data[
'deletion_interval'][
'deletion_unit'] ??
'',
143 (
int) $data[
'deletion_interval'][
'deletion_value'] ?? 0,
144 $data[
'deletion_interval'][
'deletion_time'] ??
'' 157 return new Setup\Objective\NullObjective();
171 return new Setup\Objective\NullObjective();
182 return new Setup\Objective\NullObjective();
An objective is a desired state of the system that is supposed to be created by the setup...
getUpdateObjective(Setup\Config $config=null)
__construct(Refinery\Factory $refinery)
Store information about https is enabled.
getStatusObjective(Setup\Metrics\Storage $storage)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getArrayToConfigTransformation()
getConfigInput(Setup\Config $config=null)
getBuildArtifactObjective()
getInstallObjective(Setup\Config $config=null)
A configuration for the setup.
A configuration with no content.