ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
Transformation.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 2017 Stefan Hecken <stefan.hecken@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3 
4 namespace ILIAS\Refinery\Custom;
5 
11 
16 {
19 
23  protected $transform;
24  private $factory;
25 
30  public function __construct(callable $transform, Factory $factory)
31  {
32  $this->transform = $transform;
33  $this->factory = $factory;
34  }
35 
39  public function transform($from)
40  {
41  return call_user_func($this->transform, $from);
42  }
43 }
Transform values according to custom configuration.
__construct(callable $transform, Factory $factory)
transform($from)
Perform the transformation.Please use this for transformations. It&#39;s more performant than calling inv...
Builds data types.
Definition: Factory.php:19