19 declare(strict_types=1);
29 return hash(
"sha256", self::class);
34 return "The database object is initialized.";
64 if ($environment->
getResource(Environment::RESOURCE_DATABASE)) {
68 $client_ini = $environment->
getResource(Environment::RESOURCE_CLIENT_INI);
70 $type = $client_ini->readVariable(
"db",
"type");
76 $db->initFromIniFile($client_ini);
77 $connect = $db->connect(
true);
80 "Database cannot be connected." 84 return $environment->
withResource(Environment::RESOURCE_DATABASE, $db);
92 return $environment->
getResource(Environment::RESOURCE_CLIENT_INI) !==
null;
An objective is a desired state of the system that is supposed to be created by the setup...
achieve(Environment $environment)
Objectives can be achieved.
withResource(string $id, $resource)
getLabel()
Get a label that describes this objective.
static getWrapper(string $a_type)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Signals that some goal won't be achievable by actions of the system ever.
getHash()
Get a hash for this objective.
isApplicable(Environment $environment)
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
An environment holds resources to be used in the setup process.
isNotable()
Get to know if this is an interesting objective for a human.
getPreconditions(Environment $environment)
hasConfigFor(string $component)
getConfigFor(string $component)