ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Transformation.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 2017 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3/* Copyright (c) 2017 Stefan Hecken <stefan.hecken@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5namespace ILIAS\Refinery;
6
8
18{
27 public function transform($from);
28
51 public function applyTo(Result $data) : Result;
52
60 public function __invoke($from);
61}
An exception for terminatinating execution or to throw for unit testing.
A result encapsulates a value or an error and simplifies the handling of those.
Definition: Result.php:12
A transformation is a function from one datatype to another.
__invoke($from)
Transformations should be callable.
applyTo(Result $data)
Perform the transformation and reify possible failures.
transform($from)
Perform the transformation.
$data
Definition: storeScorm.php:23