◆ achieve()
ilDatabaseConfigStoredObjective::achieve |
( |
Setup\Environment |
$environment | ) |
|
Definition at line 51 of file class.ilDatabaseConfigStoredObjective.php.
References $type, and ILIAS\Setup\Environment\getResource().
53 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
55 $type = $this->config->getType();
57 if (
$type ===
'postgres' ||
$type ===
'pdo-postgre') {
58 throw new Setup\NotExecutableException(
'ILIAS 8 no longer Supports POSTGRES');
61 $client_ini->setVariable(
"db",
"type",
$type);
62 $client_ini->setVariable(
"db",
"host", $this->config->getHost());
63 $client_ini->setVariable(
"db",
"name", $this->config->getDatabase());
64 $client_ini->setVariable(
"db",
"user", $this->config->getUser());
65 $client_ini->setVariable(
"db",
"port", (
string) ($this->config->getPort() ??
""));
66 $pw = $this->config->getPassword();
67 $client_ini->setVariable(
"db",
"pass", $pw !== null ? $pw->toString() :
"");
69 if (!$client_ini->write()) {
70 throw new Setup\UnachievableException(
"Could not write client.ini.php");
◆ getHash()
ilDatabaseConfigStoredObjective::getHash |
( |
| ) |
|
◆ getLabel()
ilDatabaseConfigStoredObjective::getLabel |
( |
| ) |
|
◆ getPreconditions()
ilDatabaseConfigStoredObjective::getPreconditions |
( |
Setup\Environment |
$environment | ) |
|
◆ isApplicable()
ilDatabaseConfigStoredObjective::isApplicable |
( |
Setup\Environment |
$environment | ) |
|
Definition at line 76 of file class.ilDatabaseConfigStoredObjective.php.
78 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
80 $port = $this->config->getPort() ??
"";
81 $pass = $this->config->getPassword() !== null ? $this->config->getPassword()->toString() :
"";
84 $client_ini->readVariable(
"db",
"type") !== $this->config->getType() ||
85 $client_ini->readVariable(
"db",
"host") !== $this->config->getHost() ||
86 $client_ini->readVariable(
"db",
"name") !== $this->config->getDatabase() ||
87 $client_ini->readVariable(
"db",
"user") !== $this->config->getUser() ||
88 $client_ini->readVariable(
"db",
"port") !== $port ||
89 $client_ini->readVariable(
"dv",
"pass") !== $pass
◆ isNotable()
ilDatabaseConfigStoredObjective::isNotable |
( |
| ) |
|
The documentation for this class was generated from the following file: