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
NewObjectTransformation.php
Go to the documentation of this file.
1
<?php
2
declare(strict_types=1);
3
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
9
namespace
ILIAS\Refinery\To\Transformation
;
10
11
use
ILIAS\Refinery\DeriveApplyToFromTransform
;
12
use
ILIAS\Refinery\Transformation
;
13
14
class
NewObjectTransformation
implements
Transformation
15
{
16
use
DeriveApplyToFromTransform
;
17
18
private
$className
;
19
23
public
function
__construct
(
string
$className
)
24
{
25
$this->className =
$className
;
26
}
27
32
public
function
transform
($from)
33
{
34
$class = new \ReflectionClass($this->className);
35
$instance = $class->newInstanceArgs($from);
36
37
return
$instance;
38
}
39
44
public
function
__invoke
($from)
45
{
46
return
$this->
transform
($from);
47
}
48
}
ILIAS\Refinery\To\Transformation\NewObjectTransformation\__construct
__construct(string $className)
Definition:
NewObjectTransformation.php:23
ILIAS\Refinery\To\Transformation\NewObjectTransformation\$className
$className
Definition:
NewObjectTransformation.php:18
Transformation
ILIAS\Refinery\DeriveApplyToFromTransform
trait DeriveApplyToFromTransform
Definition:
DeriveApplyToFromTransform.php:13
ILIAS\Refinery\To\Transformation\NewObjectTransformation\__invoke
__invoke($from)
Transformations should be callable.This MUST do the same as transform.
Definition:
NewObjectTransformation.php:44
ILIAS\Refinery\To\Transformation
Definition:
BooleanTransformation.php:10
ILIAS\Refinery\Transformation
A transformation is a function from one datatype to another.
Definition:
Transformation.php:17
ILIAS\Refinery\To\Transformation\NewObjectTransformation
Definition:
NewObjectTransformation.php:14
ILIAS\Refinery\To\Transformation\NewObjectTransformation\transform
transform($from)
Perform the transformation.Please use this for transformations. It's more performant than calling inv...
Definition:
NewObjectTransformation.php:32
src
Refinery
To
Transformation
NewObjectTransformation.php
Generated on Thu Apr 10 2025 20:01:35 for ILIAS by
1.8.13 (using
Doxyfile
)