1<?
php declare(strict_types=1);
11 use Setup\Agent\HasNoNamedObjective;
58 throw new \LogicException(
"Not yet implemented.");
69 return $this->refinery->custom()->transformation(
function (
$data) use ($levels, $intervals) {
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) {
95 throw new InvalidArgumentException(
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)) {
102 throw new InvalidArgumentException(
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)) {
110 throw new InvalidArgumentException(
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'])) {
115 throw new InvalidArgumentException(
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'])) {
120 throw new InvalidArgumentException(
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'] ??
''
An exception for terminatinating execution or to throw for unit testing.
A configuration with no content.
A non-objective, nothing to do to achieve it...
Store information about https is enabled.
getArrayToConfigTransformation()
getInstallObjective(Setup\Config $config=null)
getUpdateObjective(Setup\Config $config=null)
getStatusObjective(Setup\Metrics\Storage $storage)
getBuildArtifactObjective()
__construct(Refinery\Factory $refinery)
getConfigInput(Setup\Config $config=null)
getMigrations()
@inheritDoc
A agent is some component that performs part of the setup process.
A configuration for the setup.
An objective is a desired state of the system that is supposed to be created by the setup.
A component is the most general form of an entity in the UI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...