19 declare(strict_types=1);
39 return hash(
"sha256", self::class . $this->target);
74 if (file_exists($this->target)) {
77 mkdir($this->target, 0755);
79 $client_ini = $environment->getResource(
Setup\Environment::RESOURCE_CLIENT_INI);
80 $host = $client_ini->readVariable(
"db",
"host");
81 $user = $client_ini->readVariable(
"db",
"user");
82 $password = $client_ini->readVariable(
"db",
"pass");
83 $name = $client_ini->readVariable(
"db",
"name");
84 $port = $client_ini->readVariable(
"db",
"port");
86 $this->dumper->createDump($host, $user, $password, $name, $port, $this->target);
96 return is_writable(pathinfo($this->target, PATHINFO_DIRNAME));
103 RecursiveIteratorIterator::CHILD_FIRST
106 foreach ($files as $file_info) {
107 if ($file_info->isDir()) {
108 rmdir($file_info->getRealPath());
111 unlink($file_info->getRealPath());
isApplicable(Setup\Environment $environment)
__construct(string $target, MysqlDumper $dumper)
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.
getPreconditions(Setup\Environment $environment)
achieve(Setup\Environment $environment)
deleteDirRecursive(string $path)