ILIAS  release_8 Revision v8.24
Transformation.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21namespace ILIAS\Refinery\Custom;
22
24use ILIAS\Refinery\Transformation as TransformationInterface;
27
31class Transformation implements TransformationInterface
32{
35
38
39 public function __construct(callable $transformation)
40 {
41 $this->transformation = $transformation;
42 }
43
47 public function transform($from)
48 {
49 return call_user_func($this->transformation, $from);
50 }
51}
Builds data types.
Definition: Factory.php:21
Transform values according to custom configuration.
__construct(callable $transformation)
A transformation is a function from one datatype to another.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Constraint.php:21