ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
Config.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\WebDAV;
22
26class Config
27{
28 private const string REF_PREFIX = 'ref_';
29 private const string WEBDAV_ENDPOINT = 'webdav.php';
30 private const string MOUNT_INSTRUCTIONS_QUERY = 'mount-instructions';
31 private ?bool $is_enabed = null;
32
33 public function enableDebugging(): bool
34 {
35 return false;
36 }
37
38 public function isActive(): bool
39 {
40 return $this->is_enabed ?? $this->is_enabed = (new \ilSetting('webdav'))->get('webdav_enabled', '0') === '1';
41 }
42
43 public function getMountInstructionsQuery(): string
44 {
46 }
47
48 public function prependClientName(): bool
49 {
50 return true; // currently true for legacy reasons
51 }
52
53 public function getEndpoint(): string
54 {
56 }
57
58 public function getClientId(): string
59 {
60 return defined('CLIENT_ID') ? (string) CLIENT_ID : '';
61 }
62
63 public function getRefIdPrefix(): string
64 {
65 return self::REF_PREFIX;
66 }
67
68 public function getInvalidStartCharacters(): array
69 {
70 return ['.', '_', '~', '$', '/'];
71 }
72
73 public function getIncompatibleCharacters(): array
74 {
75 return [
76 '\\',
77 '<',
78 '>',
79 '/',
80 ':',
81 '*',
82 '?',
83 '"',
84 '|',
85 '#'
86 ];
87 }
88
89 public function getSupportedObjectTypes(): array
90 {
91 return ['cat', 'fold', 'grp', 'file'];
92 }
93
95 {
96 return 30;
97 }
98}
const string MOUNT_INSTRUCTIONS_QUERY
Definition: Config.php:30
const string WEBDAV_ENDPOINT
Definition: Config.php:29
getInvalidStartCharacters()
Definition: Config.php:68
const string REF_PREFIX
Definition: Config.php:28
getIncompatibleCharacters()
Definition: Config.php:73
getDeletedObjectsRetentionPeriod()
Definition: Config.php:94
getMountInstructionsQuery()
Definition: Config.php:43
const CLIENT_ID
Definition: constants.php:41