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
DeriveApplyToFromTransform.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8
namespace
ILIAS\Refinery
;
9
10
use
ILIAS\Data\Result
;
11
12
trait
DeriveApplyToFromTransform
13
{
19
abstract
public
function
transform($from);
20
25
public
function
applyTo
(
Result
$result
) :
Result
26
{
27
try
{
28
$value = $this->transform($result->
value
());
29
}
catch
(\
Exception
$exception) {
30
return
new
Result\Error($exception);
31
}
32
33
return
new
Result\Ok($value);
34
}
35
}
ILIAS\Refinery\applyTo
applyTo(Result $result)
Definition:
DeriveApplyToFromTransform.php:25
ILIAS\Data\Result\value
value()
Get the encapsulated value.
ILIAS\Data\Result
Definition:
Error.php:4
ILIAS\Refinery
Definition:
ByTrying.php:5
$result
$result
Definition:
CleanUpTest.php:463
ILIAS\Data\Result
A result encapsulates a value or an error and simplifies the handling of those.
Definition:
Result.php:11
DeriveApplyToFromTransform
Exception
src
Refinery
DeriveApplyToFromTransform.php
Generated on Tue Apr 8 2025 21:02:12 for ILIAS by
1.8.13 (using
Doxyfile
)