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 
11 class Factory
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 }
Transform values according to custom configuration.
Definition: Custom.php:11
$delimiter
Definition: showstats.php:16
$type
addLabels(array $labels)
Add labels to an array.
Definition: Factory.php:21
Convert a primitive to a data type.
Definition: Data.php:12
Factory for basic transformations.
Definition: Factory.php:11
Adds to any array keys for each value.
Definition: AddLabels.php:11
custom(callable $f)
Create a custom transformation.
Definition: Factory.php:45
splitString($delimiter)
Split string at given delimiter.
Definition: Factory.php:34
toData($type)
Transform primitive value to data-type.
Definition: Factory.php:56
Split a string by delimiter into array.
Definition: SplitString.php:11