ILIAS  release_8 Revision v8.24
class.ilFileSystemSetupConfig.php
Go to the documentation of this file.
1<?php
2
4
5/******************************************************************************
6 *
7 * This file is part of ILIAS, a powerful learning management system.
8 *
9 * ILIAS is licensed with the GPL-3.0, you should have received a copy
10 * of said license along with the source code.
11 *
12 * If this is not the case or you just want to try ILIAS, you'll find
13 * us at:
14 * https://www.ilias.de
15 * https://github.com/ILIAS-eLearning
16 *
17 *****************************************************************************/
19{
20 protected string $data_dir;
21
22 public function __construct(
23 string $data_dir
24 ) {
25 $this->data_dir = $this->normalizePath($data_dir);
26 }
27
28 protected function normalizePath(string $p): ?string
29 {
30 $p = preg_replace("/\\\\/", "/", $p);
31 return preg_replace("%/+$%", "", $p);
32 }
33
34 public function getDataDir(): string
35 {
36 return $this->data_dir;
37 }
38
39 public function getWebDir(): string
40 {
41 return dirname(__DIR__, 4) . "/data";
42 }
43}
A configuration for the setup.
Definition: Config.php:27
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...