6 chdir(__DIR__ .
"/..");
8 require_once(__DIR__ .
"/../libs/composer/vendor/autoload.php");
10 require_once(__DIR__ .
"/../include/inc.ilias_version.php");
13 if (!defined(
"MAGPIE_DIR")) {
14 define(
"MAGPIE_DIR",
"./Services/Feeds/magpierss/");
17 require_once(__DIR__ .
"/classes/class.ilSetupObjective.php");
18 require_once(__DIR__ .
"/classes/class.ilSetupAgent.php");
19 require_once(__DIR__ .
"/classes/class.ilSetupConfig.php");
20 require_once(__DIR__ .
"/classes/class.ilMakeInstallationAccessibleObjective.php");
21 require_once(__DIR__ .
"/classes/class.ilUseRootConfirmed.php");
22 require_once(__DIR__ .
"/classes/class.ilOwnRiskConfirmedObjective.php");
23 require_once(__DIR__ .
"/classes/class.ilOverwritesExistingInstallationConfirmed.php");
24 require_once(__DIR__ .
"/classes/class.ilIniFilesPopulatedObjective.php");
25 require_once(__DIR__ .
"/classes/class.ilIniFilesLoadedObjective.php");
26 require_once(__DIR__ .
"/classes/class.ilNICKeyRegisteredObjective.php");
27 require_once(__DIR__ .
"/classes/class.ilNICKeyStoredObjective.php");
28 require_once(__DIR__ .
"/classes/class.ilSetupConfigStoredObjective.php");
29 require_once(__DIR__ .
"/classes/class.ilSetupPasswordManager.php");
30 require_once(__DIR__ .
"/classes/class.ilSetupPasswordEncoderFactory.php");
46 if (preg_match(
"/il(\w+)SetupAgent/", $class_name, $match)) {
56 if (!defined(
"ILIAS_SETUP_IGNORE_DB_UPDATE_STEP_MESSAGES") || !ILIAS_SETUP_IGNORE_DB_UPDATE_STEP_MESSAGES) {
57 throw new \ILIAS\Setup\UnachievableException(
$message);
63 $c = new \Pimple\Container;
65 $c[
"app"] =
function (
$c) {
66 return new \ILIAS\Setup\CLI\App(
67 $c[
"command.install"],
69 $c[
"command.build-artifacts"],
70 $c[
"command.reload-control-structure"]
73 $c[
"command.install"] =
function (
$c) {
74 return new \ILIAS\Setup\CLI\InstallCommand(
77 $c[
"common_preconditions"]
80 $c[
"command.update"] =
function (
$c) {
81 return new \ILIAS\Setup\CLI\UpdateCommand(
84 $c[
"common_preconditions"]
87 $c[
"command.build-artifacts"] =
function (
$c) {
88 return new \ILIAS\Setup\CLI\BuildArtifactsCommand(
94 $c[
"command.reload-control-structure"] =
function (
$c) {
95 return new \ILIAS\Setup\CLI\ReloadControlStructureCommand(
98 $c[
"common_preconditions"]
102 $c[
"common_preconditions"] =
function (
$c) {
104 new \ilOwnRiskConfirmedObjective(),
105 new \ilUseRootConfirmed()
109 $c[
"agent"] =
function (
$c) {
110 return function () use (
$c) {
112 $c[
"ui.field_factory"],
119 $c[
"agent_finder"] =
function (
$c) {
121 ILIAS\Setup\Agent::class
125 $c[
"common_agent"] =
function (
$c) {
126 return new \ilSetupAgent(
129 $c[
"password_manager"]
133 $c[
"agents"] =
function (
$c) {
134 $agents[
"common"] =
$c[
"common_agent"];
135 foreach (
$c[
"agent_finder"]->getMatchingClassNames() as $cls) {
136 if (preg_match(
"/ILIAS\\\\Setup\\\\.*/", $cls)) {
140 if (isset($agents[
$name])) {
141 throw new \RuntimeException(
142 "Encountered duplicate agent $name in $cls" 145 $agents[strtolower($name)] =
new $cls(
154 $c[
"ui.field_factory"] =
function (
$c) {
155 return new class implements FieldFactory {
156 public function text($label, $byline = null)
158 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
160 public function numeric($label, $byline = null)
162 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
164 public function group(array $inputs,
string $label =
'')
166 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
168 public function section(array $inputs, $label, $byline = null)
170 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
172 public function dependantGroup(array $inputs)
174 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
178 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
182 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
184 public function checkbox($label, $byline = null)
186 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
188 public function tag(
string $label, array $tags, $byline = null) :
Tag 190 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
192 public function password($label, $byline = null)
194 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
196 public function select($label, array $options, $byline = null)
198 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
200 public function textarea($label, $byline = null)
202 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
204 public function radio($label, $byline = null)
206 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
208 public function multiSelect($label, array $options, $byline = null)
210 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
212 public function dateTime($label, $byline = null)
214 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
216 public function duration($label, $byline = null)
218 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
220 public function file(
UploadHandler $handler,
string $label,
string $byline = null) :
File 222 throw new \LogicException(
"The CLI-setup does not support the UI-Framework.");
227 $c[
"refinery"] =
function (
$c) {
234 $c[
"data_factory"] =
function (
$c) {
238 $c[
"lng"] =
function (
$c) {
239 return new \ilSetupLanguage(
"en");
242 $c[
"config_reader"] =
function (
$c) use ($executed_in_directory) {
243 return new \ILIAS\Setup\CLI\ConfigReader(
244 $executed_in_directory
248 $c[
"password_manager"] =
function (
$c) {
249 return new \ilSetupPasswordManager([
250 'password_encoder' =>
'bcryptphp',
252 'default_password_encoder' =>
'bcryptphp'
Class ChatMainBarProvider .
Class ilSetupPasswordManager.
get_agent_name_by_class(string $class_name)
build_container_for_setup(string $executed_in_directory)