ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Factory.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
6
12{
21 public function addLabels(array $labels)
22 {
23 return new Transformations\AddLabels($labels);
24 }
25
34 public function splitString($delimiter)
35 {
37 }
38
45 public function custom(callable $f)
46 {
47 return new Transformations\Custom($f);
48 }
49
56 public function toData($type)
57 {
58 return new Transformations\Data($type);
59 }
60}
An exception for terminatinating execution or to throw for unit testing.
Factory for basic transformations.
Definition: Factory.php:12
addLabels(array $labels)
Add labels to an array.
Definition: Factory.php:21
splitString($delimiter)
Split string at given delimiter.
Definition: Factory.php:34
custom(callable $f)
Create a custom transformation.
Definition: Factory.php:45
toData($type)
Transform primitive value to data-type.
Definition: Factory.php:56
Adds to any array keys for each value.
Definition: AddLabels.php:12
Transform values according to custom configuration.
Definition: Custom.php:12
Convert a primitive to a data type.
Definition: Data.php:13
Split a string by delimiter into array.
Definition: SplitString.php:12
$type
$delimiter
Definition: showstats.php:16