ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 
 isApplicable (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 55 of file class.ilComponentDefinitionsStoredObjective.php.

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

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

45  : array
46  {
47  return [
48  new \ilDatabaseUpdatedObjective()
49  ];
50  }

◆ isApplicable()

ilComponentDefinitionsStoredObjective::isApplicable ( Setup\Environment  $environment)

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

149  : bool
150  {
151  return true;
152  }

◆ 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: