ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ 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
s
t
w
+
Functions
_
a
b
c
f
g
h
i
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
Transformation.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 2017 Stefan Hecken <stefan.hecken@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3
4
namespace
ILIAS\Refinery\Custom
;
5
6
use
ILIAS\Data\Factory
;
7
use
ILIAS\Data\Result
;
8
use
ILIAS\Refinery\Transformation
as
TransformationInterface
;
9
use
ILIAS\Refinery\DeriveApplyToFromTransform
;
10
14
class
Transformation
implements
TransformationInterface
15
{
16
use
DeriveApplyToFromTransform
;
17
21
protected
$transform
;
22
private
$factory
;
23
28
public
function
__construct
(callable
$transform
,
Factory
$factory
)
29
{
30
$this->
transform
=
$transform
;
31
$this->factory =
$factory
;
32
}
33
37
public
function
transform
($from)
38
{
39
return
call_user_func($this->
transform
, $from);
40
}
41
45
public
function
__invoke
($from)
46
{
47
return
$this->
transform
($from);
48
}
49
}
ILIAS\Refinery\Custom\Transformation\__invoke
__invoke($from)
Transformations should be callable.This MUST do the same as transform.
Definition:
Transformation.php:45
ILIAS\Refinery\Custom
Definition:
Constraint.php:4
ILIAS\Refinery\Custom\Transformation
Transform values according to custom configuration.
Definition:
Transformation.php:14
ILIAS\Data\Result
Definition:
Error.php:4
ILIAS\Refinery\Custom\Transformation\__construct
__construct(callable $transform, Factory $factory)
Definition:
Transformation.php:28
Transformation
ILIAS\Refinery\DeriveApplyToFromTransform
trait DeriveApplyToFromTransform
Definition:
DeriveApplyToFromTransform.php:13
ILIAS\Refinery\Custom\Transformation\transform
transform($from)
Perform the transformation.Please use this for transformations. It's more performant than calling inv...
Definition:
Transformation.php:37
Factory
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:19
ILIAS\Refinery\Custom\Transformation\$transform
$transform
Definition:
Transformation.php:21
ILIAS\Refinery\Custom\Transformation\$factory
$factory
Definition:
Transformation.php:22
src
Refinery
Custom
Transformation.php
Generated on Wed Apr 9 2025 20:01:38 for ILIAS by
1.8.13 (using
Doxyfile
)