ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
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
use
ILIAS\Refinery\DeriveInvokeFromTransform
;
11
15
class
Transformation
implements
TransformationInterface
16
{
17
use
DeriveApplyToFromTransform
;
18
use
DeriveInvokeFromTransform
;
19
23
protected
$transform
;
24
private
$factory
;
25
30
public
function
__construct
(callable
$transform
,
Factory
$factory
)
31
{
32
$this->
transform
=
$transform
;
33
$this->factory =
$factory
;
34
}
35
39
public
function
transform
($from)
40
{
41
return
call_user_func($this->
transform
, $from);
42
}
43
}
ILIAS\Refinery\Custom
Definition:
Constraint.php:4
ILIAS\Refinery\Custom\Transformation
Transform values according to custom configuration.
Definition:
Transformation.php:15
ILIAS\Data\Result
Definition:
Error.php:4
ILIAS\Refinery\Custom\Transformation\__construct
__construct(callable $transform, Factory $factory)
Definition:
Transformation.php:30
Transformation
ILIAS\Refinery\DeriveApplyToFromTransform
trait DeriveApplyToFromTransform
Definition:
DeriveApplyToFromTransform.php:13
ILIAS\Refinery\DeriveInvokeFromTransform
trait DeriveInvokeFromTransform
Definition:
DeriveInvokeFromTransform.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:39
Factory
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:19
ILIAS\Refinery\Custom\Transformation\$transform
$transform
Definition:
Transformation.php:23
ILIAS\Refinery\Custom\Transformation\$factory
$factory
Definition:
Transformation.php:24
src
Refinery
Custom
Transformation.php
Generated on Wed Sep 3 2025 21:01:44 for ILIAS by
1.8.13 (using
Doxyfile
)