◆ __construct()
ilDatabaseSetupConfig::__construct |
( |
string |
$type, |
|
|
string |
$host, |
|
|
string |
$database, |
|
|
string |
$user, |
|
|
protected ?Password |
$password = null , |
|
|
protected bool |
$create_database = true , |
|
|
?string |
$collation = null , |
|
|
protected ?int |
$port = null , |
|
|
?string |
$path_to_db_dump = null |
|
) |
| |
◆ getCollation()
ilDatabaseSetupConfig::getCollation |
( |
| ) |
|
◆ getCreateDatabase()
ilDatabaseSetupConfig::getCreateDatabase |
( |
| ) |
|
◆ getDatabase()
ilDatabaseSetupConfig::getDatabase |
( |
| ) |
|
◆ getHost()
ilDatabaseSetupConfig::getHost |
( |
| ) |
|
◆ getPassword()
ilDatabaseSetupConfig::getPassword |
( |
| ) |
|
◆ getPathToDBDump()
ilDatabaseSetupConfig::getPathToDBDump |
( |
| ) |
|
◆ getPort()
ilDatabaseSetupConfig::getPort |
( |
| ) |
|
◆ getType()
ilDatabaseSetupConfig::getType |
( |
| ) |
|
◆ getUser()
ilDatabaseSetupConfig::getUser |
( |
| ) |
|
◆ toMockIniFile()
ilDatabaseSetupConfig::toMockIniFile |
( |
| ) |
|
Adapter to current database-handling via a mock of .
reads a single variable from a group public
- Parameters
-
string | group name |
string | value |
- Returns
- mixed|void return value string or boolean 'false' on failure
Definition at line 120 of file class.ilDatabaseSetupConfig.php.
References __construct(), and null.
122 return new class ($this) extends \
ilIniFile {
130 public function readVariable(
string $a_group,
string $a_var_name): string
132 if ($a_group !==
"db") {
133 throw new \LogicException(
134 "Can only access db-config via this mock." 137 switch ($a_var_name) {
139 return $this->config->getUser();
141 return $this->config->getHost();
143 return (
string) $this->config->getPort();
145 $pw = $this->config->getPassword();
146 return $pw !==
null ? $pw->toString() :
"";
148 return $this->config->getDatabase();
150 return $this->config->getType();
152 throw new \LogicException(
153 "Cannot provide variable '$a_var_name'" 161 public function read(): bool
163 throw new \LogicException(
"Just a mock here...");
165 public function parse(): bool
167 throw new \LogicException(
"Just a mock here...");
169 public function fixIniFile(): never
171 throw new \LogicException(
"Just a mock here...");
173 public function write(): bool
175 throw new \LogicException(
"Just a mock here...");
177 public function show(): string
179 throw new \LogicException(
"Just a mock here...");
181 public function getGroupCount():
int 183 throw new \LogicException(
"Just a mock here...");
185 public function readGroups(): array
187 throw new \LogicException(
"Just a mock here...");
189 public function groupExists(
string $a_group_name): bool
191 throw new \LogicException(
"Just a mock here...");
193 public function readGroup(
string $a_group_name): array
195 throw new \LogicException(
"Just a mock here...");
197 public function addGroup(
string $a_group_name): bool
199 throw new \LogicException(
"Just a mock here...");
201 public function removeGroup(
string $a_group_name): bool
203 throw new \LogicException(
"Just a mock here...");
205 public function variableExists(
string $a_group,
string $a_var_name): bool
207 throw new \LogicException(
"Just a mock here...");
209 public function setVariable(
string $a_group_name,
string $a_var_name,
string $a_var_value): bool
211 throw new \LogicException(
"Just a mock here...");
213 public function error(
string $a_errmsg): bool
215 throw new \LogicException(
"Just a mock here...");
217 public function getError(): string
219 throw new \LogicException(
"Just a mock here...");
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(string $type, string $host, string $database, string $user, protected ?Password $password=null, protected bool $create_database=true, ?string $collation=null, protected ?int $port=null, ?string $path_to_db_dump=null)
ilDatabaseSetupConfig $config
INIFile Parser Early access in init proceess! Avoid further dependencies like logging or other servic...
◆ $collation
string ilDatabaseSetupConfig::$collation |
|
protected |
◆ $config
◆ $database
string ilDatabaseSetupConfig::$database |
|
protected |
◆ $host
string ilDatabaseSetupConfig::$host |
|
protected |
◆ $path_to_db_dump
string ilDatabaseSetupConfig::$path_to_db_dump |
|
protected |
◆ $type
string ilDatabaseSetupConfig::$type |
|
protected |
◆ $user
string ilDatabaseSetupConfig::$user |
|
protected |
◆ DEFAULT_COLLATION
const ilDatabaseSetupConfig::DEFAULT_COLLATION = "utf8_general_ci" |
◆ DEFAULT_PATH_TO_DB_DUMP
const ilDatabaseSetupConfig::DEFAULT_PATH_TO_DB_DUMP = "./components/ILIAS/setup_/sql/ilias3.sql" |
The documentation for this class was generated from the following file: