3declare(strict_types=1);
 
   32            new \ilIniFilesLoadedObjective(),
 
   33            new \ilDatabaseInitializedObjective()
 
   39        $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
 
   41            $storage->storeConfigText(
 
   43                $client_ini->readVariable(
"db", 
"type") ?? 
"mysql",
 
   44                "The storage backend that is used for the database." 
   46            $storage->storeConfigText(
 
   48                $client_ini->readVariable(
"db", 
"host"),
 
   49                "The host where the storage backend is located." 
   51            $storage->storeConfigText(
 
   53                $client_ini->readVariable(
"db", 
"port"),
 
   54                "The port where the storage backend is located at the host." 
   56            $storage->storeConfigText(
 
   58                $client_ini->readVariable(
"db", 
"name"),
 
   59                "The name of the database in the storage backend." 
   61            $storage->storeConfigText(
 
   63                $client_ini->readVariable(
"db", 
"user"),
 
   64                "The user to be used for the storage backend." 
   66            $storage->storeConfigText(
 
   68                PHP_SAPI === 
'cli' ? $client_ini->readVariable(
"db", 
"pass") : 
'********',
 
   69                "The password for the user for the storage backend." 
   74        $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
 
   75        $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
 
   79        $client_id = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_ID);
 
   90        $GLOBALS[
"DIC"][
"ilLog"] = 
new class () {
 
   91            public function write(): 
void 
   94            public function info(): 
void 
   97            public function warning($msg): 
void 
  100            public function error($msg): 
void 
  106        $GLOBALS[
"DIC"][
"ilLoggerFactory"] = 
new class () {
 
  107            public function getRootLogger(): 
object 
  109                return new class () {
 
  110                    public function write(): 
void 
  116        $GLOBALS[
"ilCtrlStructureReader"] = 
new class () {
 
  117            public function getStructure(): 
void 
  120            public function setIniFile(): 
void 
  124        if (!defined(
"CLIENT_DATA_DIR")) {
 
  125            define(
"CLIENT_DATA_DIR", 
$ini->readVariable(
"clients", 
"datadir") . 
"/" . 
$client_id);
 
  127        if (!defined(
"CLIENT_WEB_DIR")) {
 
  128            define(
"CLIENT_WEB_DIR", dirname(__DIR__, 4) . 
"/data/" . 
$client_id);
 
  130        if (!defined(
"ILIAS_ABSOLUTE_PATH")) {
 
  131            define(
"ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
 
  133        if (!defined(
"ILIAS_LOG_ENABLED")) {
 
  134            define(
"ILIAS_LOG_ENABLED", 
false);
 
  136        if (!defined(
"ROOT_FOLDER_ID")) {
 
  137            define(
"ROOT_FOLDER_ID", (
int) $client_ini->readVariable(
"system", 
"ROOT_FOLDER_ID"));
 
  139        if (!defined(
"ROLE_FOLDER_ID")) {
 
  140            define(
"ROLE_FOLDER_ID", (
int) $client_ini->readVariable(
"system", 
"ROLE_FOLDER_ID"));
 
  142        if (!defined(
"SYSTEM_FOLDER_ID")) {
 
  143            define(
"SYSTEM_FOLDER_ID", (
int) $client_ini->readVariable(
"system", 
"SYSTEM_FOLDER_ID"));
 
  147        $db_update->readCustomUpdatesInfo(
true);
 
  149        $storage->storeStableCounter(
 
  151            $db_update->getCurrentVersion(),
 
  152            "The version of the database schema that is currently installed." 
  154        $storage->storeStableCounter(
 
  156            $db_update->getFileVersion(),
 
  157            "The version of the database schema that is available in the current source." 
  159        $storage->storeStableBool(
 
  161            !$db_update->getDBVersionStatus(),
 
  162            "Does the database require an update?" 
  164        $storage->storeStableCounter(
 
  166            $db_update->getHotfixCurrentVersion() ?? 0,
 
  167            "The version of the hotfix database schema that is currently installed." 
  169        $storage->storeStableCounter(
 
  170            "available_hotfix_version",
 
  171            $db_update->getHotfixFileVersion() ?? 0,
 
  172            "The version of the hotfix database schema that is available in the current source." 
  174        $storage->storeStableBool(
 
  176            $db_update->hotfixAvailable(),
 
  177            "Does the database require a hotfix update?" 
  179        $storage->storeStableCounter(
 
  181            $db_update->getCustomUpdatesCurrentVersion() ?? 0,
 
  182            "The version of the custom database schema that is currently installed." 
  184        $storage->storeStableCounter(
 
  185            "available_custom_version",
 
  186            $db_update->getCustomUpdatesFileVersion() ?? 0,
 
  187            "The version of the custom database schema that is available in the current source." 
  189        $storage->storeStableBool(
 
  190            "custom_update_required",
 
  191            $db_update->customUpdatesAvailable(),
 
  192            "Does the database require a custom update?" 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
 
Customizing of pimple-DIC for ILIAS.
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage)
 
getTentativePreconditions(Setup\Environment $environment)
 
An environment holds resources to be used in the setup process.
 
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...