ILIAS  release_7 Revision v7.30-3-g800a261c036
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 $transform, Factory $factory)
 
 transform ($from)
 Perform the transformation.Please use this for transformations. It's more performant than calling invoke.
Exceptions
More...
 
- Public Member Functions inherited from ILIAS\Refinery\Transformation
 applyTo (Result $data)
 Perform the transformation and reify possible failures. More...
 
 __invoke ($from)
 Transformations should be callable. More...
 

Protected Attributes

 $transform
 

Private Attributes

 $factory
 

Detailed Description

Transform values according to custom configuration.

Definition at line 15 of file Transformation.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Refinery\Custom\Transformation::__construct ( callable  $transform,
Factory  $factory 
)
Parameters
callable$transform
Factory | null$factory

Definition at line 30 of file Transformation.php.

References ILIAS\Refinery\Custom\Transformation\$factory, ILIAS\Refinery\Custom\Transformation\$transform, and ILIAS\Refinery\Custom\Transformation\transform().

31  {
32  $this->transform = $transform;
33  $this->factory = $factory;
34  }
transform($from)
Perform the transformation.Please use this for transformations. It's more performant than calling inv...
+ Here is the call graph for this function:

Member Function Documentation

◆ transform()

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

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

Exceptions

Implements ILIAS\Refinery\Transformation.

Definition at line 39 of file Transformation.php.

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

40  {
41  return call_user_func($this->transform, $from);
42  }
transform($from)
Perform the transformation.Please use this for transformations. It's more performant than calling inv...
+ Here is the caller graph for this function:

Field Documentation

◆ $factory

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

Definition at line 24 of file Transformation.php.

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

◆ $transform

ILIAS\Refinery\Custom\Transformation::$transform
protected

Definition at line 23 of file Transformation.php.

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


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