ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilComponentDefinitionsStoredObjective Class Reference
+ Inheritance diagram for ilComponentDefinitionsStoredObjective:
+ Collaboration diagram for ilComponentDefinitionsStoredObjective:

Public Member Functions

 __construct (bool $populate_before=true)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 

Protected Attributes

 $populate_before
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilComponentDefinitionsStoredObjective::__construct ( bool  $populate_before = true)

Member Function Documentation

◆ achieve()

ilComponentDefinitionsStoredObjective::achieve ( Setup\Environment  $environment)

Definition at line 56 of file class.ilComponentDefinitionsStoredObjective.php.

References $DIC, $GLOBALS, $ini, $service, ilModule\getAvailableCoreModules(), ilService\getAvailableCoreServices(), and ILIAS\Setup\Environment\getResource().

56  : Setup\Environment
57  {
58  $ilias_path = __DIR__ . "/../../../..";
59 
60  $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
61  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
62  $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
63 
64  // ATTENTION: This is a total abomination. It only exists to allow various
65  // sub components of the various readers to run. This is a memento to the
66  // fact, that dependency injection is something we want. Currently, every
67  // component could just service locate the whole world via the global $DIC.
68  $DIC = $GLOBALS["DIC"];
69  $GLOBALS["DIC"] = new DI\Container();
70  $GLOBALS["DIC"]["ilDB"] = $db;
71  $GLOBALS["DIC"]["ilIliasIniFile"] = $ini;
72  $GLOBALS["DIC"]["ilClientIniFile"] = $ini;
73  $GLOBALS["DIC"]["ilBench"] = null;
74  $GLOBALS["DIC"]["ilObjDataCache"] = null;
75  $GLOBALS["DIC"]["lng"] = new class() {
76  public function loadLanguageModule()
77  {
78  }
79  };
80  $GLOBALS["DIC"]["ilLog"] = new class() {
81  public function write()
82  {
83  }
84  public function debug()
85  {
86  }
87  };
88  $GLOBALS["DIC"]["ilLoggerFactory"] = new class() {
89  public function getRootLogger()
90  {
91  return new class() {
92  public function write()
93  {
94  }
95  };
96  }
97  public function getLogger()
98  {
99  return new class() {
100  public function write()
101  {
102  }
103  };
104  }
105  };
106  if (!defined("ILIAS_LOG_ENABLED")) {
107  define("ILIAS_LOG_ENABLED", false);
108  }
109  if (!defined("ILIAS_ABSOLUTE_PATH")) {
110  define("ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
111  }
112 
113  $mr = new \ilModuleReader("", "", "", $db);
114  $mr->clearTables();
116 
117  foreach ($modules as $module) {
118  $mr = new ilModuleReader(
119  $ilias_path . "/Modules/" . $module["subdir"] . "/module.xml",
120  $module["subdir"],
121  "Modules",
122  $db
123  );
124  $mr->getModules();
125  unset($mr);
126  }
127 
128  $sr = new \ilServiceReader("", "", "", $db);
129  $sr->clearTables();
131  foreach ($services as $service) {
132  $sr = new ilServiceReader(
133  $ilias_path . "/Services/" . $service["subdir"] . "/service.xml",
134  $service["subdir"],
135  "Services",
136  $db
137  );
138  $sr->getServices();
139  unset($sr);
140  }
141 
142  $GLOBALS["DIC"] = $DIC;
143 
144  return $environment;
145  }
Class ilServiceReader.
static getAvailableCoreServices()
Get all available core services.
$service
Definition: result.php:17
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$DIC
Definition: xapitoken.php:46
Class ilModuleReader.
static getAvailableCoreModules()
Get all available core modules.
$ini
Definition: raiseError.php:4
+ Here is the call graph for this function:

◆ getHash()

ilComponentDefinitionsStoredObjective::getHash ( )

Definition at line 21 of file class.ilComponentDefinitionsStoredObjective.php.

21  : string
22  {
23  return hash("sha256", self::class);
24  }

◆ getLabel()

ilComponentDefinitionsStoredObjective::getLabel ( )

Definition at line 29 of file class.ilComponentDefinitionsStoredObjective.php.

29  : string
30  {
31  return "Module- and Servicedefinitions are stored. Events are initialized.";
32  }

◆ getPreconditions()

ilComponentDefinitionsStoredObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 45 of file class.ilComponentDefinitionsStoredObjective.php.

References $config.

45  : array
46  {
47  $config = $environment->getConfigFor('database');
48  return [
49  new \ilDatabaseUpdatedObjective($config, $this->populate_before)
50  ];
51  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68

◆ isNotable()

ilComponentDefinitionsStoredObjective::isNotable ( )

Definition at line 37 of file class.ilComponentDefinitionsStoredObjective.php.

37  : bool
38  {
39  return true;
40  }

Field Documentation

◆ $populate_before

ilComponentDefinitionsStoredObjective::$populate_before
protected

Definition at line 11 of file class.ilComponentDefinitionsStoredObjective.php.

Referenced by __construct().


The documentation for this class was generated from the following file: