12 return hash(
"sha256", self::class);
17 return "Fill ini with settings for Services/Database";
35 $client_ini = $environment->
getResource(Setup\Environment::RESOURCE_CLIENT_INI);
37 $client_ini->setVariable(
"db",
"type", $this->config->getType());
38 $client_ini->setVariable(
"db",
"host", $this->config->getHost());
39 $client_ini->setVariable(
"db",
"name", $this->config->getDatabase());
40 $client_ini->setVariable(
"db",
"user", $this->config->getUser());
41 $client_ini->setVariable(
"db",
"port", $this->config->getPort() ??
"");
42 $pw = $this->config->getPassword();
43 $client_ini->setVariable(
"db",
"pass", $pw ? $pw->toString() :
"");
45 if (!$client_ini->write()) {
46 throw new Setup\UnachievableException(
"Could not write client.ini.php");
54 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
56 $port = $this->config->getPort() ??
"";
57 $pass = $this->config->getPassword() ? $this->config->getPassword()->toString() :
"";
60 $client_ini->readVariable(
"db",
"type") !== $this->config->getType() ||
61 $client_ini->readVariable(
"db",
"host") !== $this->config->getHost() ||
62 $client_ini->readVariable(
"db",
"name") !== $this->config->getDatabase() ||
63 $client_ini->readVariable(
"db",
"user") !== $this->config->getUser() ||
64 $client_ini->readVariable(
"db",
"port") !== $port ||
65 $client_ini->readVariable(
"dv",
"pass") !==
$pass
achieve(Setup\Environment $environment)
getPreconditions(Setup\Environment $environment)
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An environment holds resources to be used in the setup process.
isApplicable(Setup\Environment $environment)