ILIAS  release_8 Revision v8.23
ILIAS\Refinery\Custom\Transformation Class Reference

Transform values according to custom configuration. More...

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

Public Member Functions

 __construct (callable $transformation)
 
 transform ($from)
 
- Public Member Functions inherited from ILIAS\Refinery\Transformation
 applyTo (Result $result)
 Perform the transformation and reify possible failures. More...
 
 __invoke ($from)
 Transformations should be callable. More...
 

Private Attributes

 $transformation
 

Detailed Description

Transform values according to custom configuration.

Definition at line 31 of file Transformation.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Refinery\Custom\Transformation::__construct ( callable  $transformation)

Definition at line 39 of file Transformation.php.

References ILIAS\Refinery\Custom\Transformation\$transformation.

40  {
41  $this->transformation = $transformation;
42  }

Member Function Documentation

◆ transform()

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

Implements ILIAS\Refinery\Transformation.

Definition at line 47 of file Transformation.php.

48  {
49  return call_user_func($this->transformation, $from);
50  }

Field Documentation

◆ $transformation

ILIAS\Refinery\Custom\Transformation::$transformation
private

Definition at line 37 of file Transformation.php.

Referenced by ILIAS\Refinery\Custom\Transformation\__construct().


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