ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ilWebDAVMountInstructionsFactory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
Psr\Http\Message\RequestInterface
;
22
27
class
ilWebDAVMountInstructionsFactory
28
{
29
public
function
__construct
(
30
private
ilWebDAVMountInstructionsRepositoryImpl
$repo,
31
private
RequestInterface
$request,
32
private
ilObjUser
$user
33
) {
34
}
35
36
public
function
getMountInstructionsObject
():
ilWebDAVBaseMountInstructions
37
{
38
$uri_builder =
new
ilWebDAVUriBuilder
($this->request);
39
$uri = $this->request->getUri()->getPath();
40
41
$splitted_uri = explode(
'/'
, $uri);
42
43
// Remove path elements before and until webdav script
44
while
(array_shift($splitted_uri) !==
'webdav.php'
&& $splitted_uri !== []) {
45
;
46
}
47
48
$path_value = $splitted_uri[1] ??
''
;
49
50
if
(strlen($path_value) === 2) {
51
return
new
ilWebDAVObjectlessMountInstructions
(
52
$this->repo,
53
$uri_builder,
54
new
ilSetting
(),
55
$path_value
56
);
57
}
58
59
if
(str_starts_with($path_value,
'ref_'
)) {
60
return
new
ilWebDAVObjectMountInstructions
(
61
$this->repo,
62
$uri_builder,
63
new
ilSetting
(),
64
$this->
user
->getLanguage(),
65
(
int
) substr($path_value, 4)
66
);
67
}
68
69
throw
new
InvalidArgumentException
(
"Invalid path given"
);
70
}
71
}
ilWebDAVBaseMountInstructions
Definition:
class.ilWebDAVBaseMountInstructions.php:21
ilWebDAVObjectMountInstructions
Definition:
class.ilWebDAVObjectMountInstructions.php:25
ilWebDAVUriBuilder
Definition:
class.ilWebDAVUriBuilder.php:24
ILIAS\Repository\user
user()
Definition:
trait.GlobalDICDomainServices.php:66
ilObjUser
ilWebDAVMountInstructionsRepositoryImpl
Definition:
class.ilWebDAVMountInstructionsRepositoryImpl.php:21
RequestInterface
ilWebDAVMountInstructionsFactory\__construct
__construct(private ilWebDAVMountInstructionsRepositoryImpl $repo, private RequestInterface $request, private ilObjUser $user)
Definition:
class.ilWebDAVMountInstructionsFactory.php:29
ilWebDAVObjectlessMountInstructions
Definition:
class.ilWebDAVObjectlessMountInstructions.php:21
ilWebDAVMountInstructionsFactory
Definition:
class.ilWebDAVMountInstructionsFactory.php:27
InvalidArgumentException
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ilSetting
ilWebDAVMountInstructionsFactory\getMountInstructionsObject
getMountInstructionsObject()
Definition:
class.ilWebDAVMountInstructionsFactory.php:36
components
ILIAS
WebDAV
classes
mount_instructions
class.ilWebDAVMountInstructionsFactory.php
Generated on Sun Aug 31 2025 23:04:20 for ILIAS by
1.8.13 (using
Doxyfile
)