ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
LocalConfig.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
7 /******************************************************************************
8  *
9  * This file is part of ILIAS, a powerful learning management system.
10  *
11  * ILIAS is licensed with the GPL-3.0, you should have received a copy
12  * of said license along with the source code.
13  *
14  * If this is not the case or you just want to try ILIAS, you'll find
15  * us at:
16  * https://www.ilias.de
17  * https://github.com/ILIAS-eLearning
18  *
19  *****************************************************************************/
29 final class LocalConfig
30 {
35  public const DISALLOW_LINKS = 1;
39  public const SKIP_LINKS = 2;
40 
41  private int $fileAccessPublic;
42  private int $fileAccessPrivate;
45  private string $rootPath;
46  private int $lockMode;
47  private int $linkBehaviour;
48 
49 
94  public function __construct(
95  string $rootPath,
96  int $fileAccessPublic = 0744,
97  int $fileAccessPrivate = 0700,
98  int $directoryAccessPublic = 0755,
99  int $directoryAccessPrivate = 0700,
100  int $lockMode = LOCK_EX,
101  int $linkBehaviour = self::SKIP_LINKS
102  ) {
103  $this->rootPath = $rootPath;
104  $this->fileAccessPublic = $fileAccessPublic;
105  $this->fileAccessPrivate = $fileAccessPrivate;
106  $this->directoryAccessPublic = $directoryAccessPublic;
107  $this->directoryAccessPrivate = $directoryAccessPrivate;
108  $this->lockMode = $lockMode;
109  $this->linkBehaviour = $linkBehaviour;
110  }
111 
112 
116  public function getFileAccessPublic(): int
117  {
119  }
120 
121 
125  public function getFileAccessPrivate(): int
126  {
128  }
129 
130 
134  public function getDirectoryAccessPublic(): int
135  {
137  }
138 
139 
143  public function getDirectoryAccessPrivate(): int
144  {
146  }
147 
148 
152  public function getRootPath(): string
153  {
154  return $this->rootPath;
155  }
156 
157 
161  public function getLockMode(): int
162  {
163  return $this->lockMode;
164  }
165 
166 
170  public function getLinkBehaviour(): int
171  {
172  return $this->linkBehaviour;
173  }
174 }
__construct(string $rootPath, int $fileAccessPublic=0744, int $fileAccessPrivate=0700, int $directoryAccessPublic=0755, int $directoryAccessPrivate=0700, int $lockMode=LOCK_EX, int $linkBehaviour=self::SKIP_LINKS)
LocalConfig constructor.
Definition: LocalConfig.php:94
const DISALLOW_LINKS
This is the default behaviour because links violate the root filesystem constraint.
Definition: LocalConfig.php:35