ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
StringTransformation.php
Go to the documentation of this file.
1
<?php declare(strict_types=1);
2
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8
namespace
ILIAS\Refinery\URI
;
9
10
use
ILIAS\Data\URI
;
11
use
ILIAS\Refinery\ConstraintViolationException
;
12
use
ILIAS\Refinery\DeriveApplyToFromTransform
;
13
use
ILIAS\Refinery\Transformation
;
14
use
ILIAS\Refinery\DeriveInvokeFromTransform
;
15
16
class
StringTransformation
implements
Transformation
17
{
18
use
DeriveApplyToFromTransform
;
19
use
DeriveInvokeFromTransform
;
20
24
public
function
transform
($from)
25
{
26
if
(
false
=== $from instanceof
URI
) {
27
throw
new
ConstraintViolationException
(
28
sprintf(
'The value MUST be of type "%s"'
, URI::class),
29
'not_uri_object'
30
);
31
}
32
34
$result
= $from->getBaseURI();
35
36
$query
= $from->getQuery();
37
if
(null !==
$query
) {
38
$query
=
'?'
.
$query
;
39
}
40
$result
.=
$query
;
41
42
$fragment
= $from->getFragment();
43
if
(null !==
$fragment
) {
44
$fragment
=
'#'
.
$fragment
;
45
}
46
$result
.=
$fragment
;
47
48
return
$result
;
49
}
50
}
ILIAS\Refinery\URI
Definition:
Group.php:8
$result
$result
Definition:
CleanUpTest.php:463
ILIAS\Refinery\URI\StringTransformation
Definition:
StringTransformation.php:16
Transformation
ILIAS\Refinery\DeriveApplyToFromTransform
trait DeriveApplyToFromTransform
Definition:
DeriveApplyToFromTransform.php:13
ILIAS\Refinery\Transformation\transform
transform($from)
Perform the transformation.
ILIAS\Data\URI\$query
$query
Definition:
URI.php:38
ILIAS\Refinery\DeriveInvokeFromTransform
trait DeriveInvokeFromTransform
Definition:
DeriveInvokeFromTransform.php:13
ILIAS\Refinery\ConstraintViolationException
Definition:
ConstraintViolationException.php:14
ILIAS\Data\URI
The scope of this class is split ilias-conform URI's into components.
Definition:
URI.php:17
URI
ILIAS\Refinery\Transformation
A transformation is a function from one datatype to another.
Definition:
Transformation.php:17
ConstraintViolationException
ILIAS\Data\URI\$fragment
$fragment
Definition:
URI.php:42
src
Refinery
URI
StringTransformation.php
Generated on Sun Apr 6 2025 21:01:48 for ILIAS by
1.8.13 (using
Doxyfile
)