ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
A transformation is a function from one datatype to another. More...
Public Member Functions | |
transform ($from) | |
Perform the transformation. More... | |
__invoke ($from) | |
Transformations should be callable. More... | |
A transformation is a function from one datatype to another.
It MUST NOT perform any sideeffects, i.e. it must be morally impossible to observe how often the transformation was actually performed. It MUST NOT touch the provided value, i.e. it is allowed to create new values but not to modify existing values.i This would be an observable sideeffect.
Definition at line 15 of file Transformation.php.
ILIAS\Transformation\Transformation::__invoke | ( | $from | ) |
Transformations should be callable.
This MUST do the same as transform.
Implemented in ILIAS\Transformation\Transformations\Data, ILIAS\Transformation\Transformations\AddLabels, ILIAS\Transformation\Transformations\SplitString, and ILIAS\Transformation\Transformations\Custom.
ILIAS\Transformation\Transformation::transform | ( | $from | ) |
Perform the transformation.
Please use this for transformations. It's more performant than calling invoke.
Implemented in ILIAS\Transformation\Transformations\Data, ILIAS\Transformation\Transformations\AddLabels, ILIAS\Transformation\Transformations\Custom, and ILIAS\Transformation\Transformations\SplitString.