19 declare(strict_types=1);
28 return hash(
"sha256", implode(
"-", [
30 $this->config->getHost(),
31 $this->config->getPort(),
32 $this->config->getDatabase()
38 return "The database exists on the server.";
52 new \ilDatabaseServerIsConnectableObjective($this->config)
54 if ($this->config->getCreateDatabase()) {
55 $preconditions[] = new \ilDatabaseCreatedObjective($this->config);
57 return $preconditions;
63 $db->initFromIniFile($this->config->toMockIniFile());
64 $connect = $db->connect(
true);
67 "Database cannot be connected. Please check the credentials." 71 return $environment->
withResource(Environment::RESOURCE_DATABASE, $db);
isNotable()
Get to know if this is an interesting objective for a human.
achieve(Environment $environment)
Objectives can be achieved.
withResource(string $id, $resource)
getHash()
Get a hash for this objective.
static getWrapper(string $a_type)
Signals that some goal won't be achievable by actions of the system ever.
getPreconditions(Environment $environment)
getLabel()
Get a label that describes this objective.
isApplicable(Environment $environment)
An environment holds resources to be used in the setup process.