ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Refinery\Transformation
 transform ($from)
 Perform the transformation. More...
 
 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 30 of file Transformation.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 38 of file Transformation.php.

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

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

Member Function Documentation

◆ transform()

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

@inheritDoc

Implements ILIAS\Refinery\Transformation.

Definition at line 46 of file Transformation.php.

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

Field Documentation

◆ $transformation

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

Definition at line 36 of file Transformation.php.

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


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