ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ILIAS\Transformation\Transformation Interface Reference

A transformation is a function from one datatype to another. More...

+ Inheritance diagram for ILIAS\Transformation\Transformation:
+ Collaboration diagram for ILIAS\Transformation\Transformation:

Public Member Functions

 transform ($from)
 Perform the transformation. More...
 
 __invoke ($from)
 Transformations should be callable. More...
 

Detailed Description

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.

Member Function Documentation

◆ __invoke()

ILIAS\Transformation\Transformation::__invoke (   $from)

◆ transform()

ILIAS\Transformation\Transformation::transform (   $from)

Perform the transformation.

Please use this for transformations. It's more performant than calling invoke.

Exceptions

Implemented in ILIAS\Transformation\Transformations\Data, ILIAS\Transformation\Transformations\AddLabels, ILIAS\Transformation\Transformations\Custom, and ILIAS\Transformation\Transformations\SplitString.


The documentation for this interface was generated from the following file: