ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilFileSystemSetupConfig.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
5 use ILIAS\Setup;
6 
7 class ilFileSystemSetupConfig implements Setup\Config
8 {
12  protected $data_dir;
13 
14  public function __construct(
15  string $data_dir
16  ) {
17  $this->data_dir = $this->normalizePath($data_dir);
18  }
19 
20  protected function normalizePath(string $p) : string
21  {
22  $p = preg_replace("/\\\\/", "/", $p);
23  return preg_replace("%/+$%", "", $p);
24  }
25 
26  public function getDataDir() : string
27  {
28  return $this->data_dir;
29  }
30 
31  public function getWebDir() : string
32  {
33  return dirname(__DIR__, 4) . "/data";
34  }
35 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...