ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilFileSystemSetupConfig.php
Go to the documentation of this file.
1 <?php
2 
19 use ILIAS\Setup;
20 
21 class ilFileSystemSetupConfig implements Setup\Config
22 {
23  protected string $data_dir;
24 
25  public function __construct(
26  string $data_dir
27  ) {
28  $this->data_dir = $this->normalizePath($data_dir);
29  }
30 
31  protected function normalizePath(string $p): ?string
32  {
33  $p = preg_replace("/\\\\/", "/", $p);
34  return preg_replace("%/+$%", "", $p);
35  }
36 
37  public function getDataDir(): string
38  {
39  return $this->data_dir;
40  }
41 
42  public function getWebDir(): string
43  {
44  return dirname(__DIR__, 5) . "/public/data";
45  }
46 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...