ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
Util.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Filesystem\Provider\FlySystem
;
22
28
class
Util
// extends \League\Flysystem\Util
29
{
30
public
static
function
normalizeRelativePath
(
string
$path
): string
31
{
32
$path
= preg_replace(
"#\\\\(?!['\\\])#m"
,
'/'
,
$path
);
// this only replaces backslashes
33
$path
= preg_replace(
'#\p{C}+#u'
,
''
, (
string
)
$path
);
34
$parts
= [];
35
36
foreach
(explode(
'/'
, (
string
)
$path
) as $part) {
37
switch
($part) {
38
case
''
:
39
case
'.'
:
40
break
;
41
42
case
'..'
:
43
if
(empty(
$parts
)) {
44
throw
new \LogicException(
45
'Path is outside of the defined root, path: ['
.
$path
.
']'
46
);
47
}
48
array_pop(
$parts
);
49
break
;
50
51
default
:
52
$parts
[] = $part;
53
break
;
54
}
55
}
56
57
return
implode(
'/'
,
$parts
);
58
}
59
}
ILIAS\Filesystem\Provider\FlySystem\Util
Definition:
Util.php:29
ILIAS\Filesystem\Provider\FlySystem\Util\normalizeRelativePath
static normalizeRelativePath(string $path)
Definition:
Util.php:30
$path
$path
Definition:
ltiservices.php:30
$parts
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition:
ltitoken.php:61
ILIAS\Filesystem\Provider\FlySystem
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
FlySystemDirectoryAccess.php:21
components
ILIAS
Filesystem
src
Provider
FlySystem
Util.php
Generated on Sat Oct 18 2025 23:02:39 for ILIAS by
1.9.4 (using
Doxyfile
)