19declare(strict_types=1);
28 return hash(
"sha256", self::class);
33 return "The database is updated.";
51 return $preconditions;
56 $db = $environment->
getResource(Setup\Environment::RESOURCE_DATABASE);
57 $io = $environment->getResource(Setup\Environment::RESOURCE_ADMIN_INTERACTION);
58 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
59 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
60 $client_id = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_ID);
72 $GLOBALS[
"DIC"][
"ilLog"] =
new class ($io) {
78 public function write():
void
82 public function info():
void
86 public function warning($msg):
void
88 $this->io->inform($msg);
91 public function error($msg):
void
94 "Problem in DB-Update: $msg"
99 $GLOBALS[
"DIC"][
"ilLoggerFactory"] =
new class () {
100 public function getRootLogger():
object
102 return new class () {
103 public function write():
void
109 $GLOBALS[
"ilCtrlStructureReader"] =
new class () {
110 public function getStructure():
void
114 public function setIniFile():
void
118 if (!defined(
"CLIENT_DATA_DIR")) {
119 define(
"CLIENT_DATA_DIR",
$ini->readVariable(
"clients",
"datadir") .
"/" .
$client_id);
121 if (!defined(
"CLIENT_WEB_DIR")) {
122 define(
"CLIENT_WEB_DIR", dirname(__DIR__, 4) .
"/data/" .
$client_id);
124 if (!defined(
"ILIAS_ABSOLUTE_PATH")) {
125 define(
"ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
127 if (!defined(
"ILIAS_LOG_ENABLED")) {
128 define(
"ILIAS_LOG_ENABLED",
false);
130 if (!defined(
"ROOT_FOLDER_ID")) {
131 define(
"ROOT_FOLDER_ID", (
int) $client_ini->readVariable(
"system",
"ROOT_FOLDER_ID"));
133 if (!defined(
"ROLE_FOLDER_ID")) {
134 define(
"ROLE_FOLDER_ID", (
int) $client_ini->readVariable(
"system",
"ROLE_FOLDER_ID"));
136 if (!defined(
"SYSTEM_FOLDER_ID")) {
137 define(
"SYSTEM_FOLDER_ID", (
int) $client_ini->readVariable(
"system",
"SYSTEM_FOLDER_ID"));
142 $db_update->applyUpdate();
143 $db_update->applyHotfix();
144 $db_update->applyCustomUpdates();
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Customizing of pimple-DIC for ILIAS.
Read the client id of the installation from the data directory.
Signals that some goal won't be achievable by actions of the system ever.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
achieve(Setup\Environment $environment)
getPreconditions(Setup\Environment $environment)
isApplicable(Setup\Environment $environment)
@inheritDoc
An environment holds resources to be used in the setup process.
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
An objective is a desired state of the system that is supposed to be created by the setup.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...