ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Factory for basic transformations. More...
Public Member Functions | |
addLabels (array $labels) | |
Add labels to an array. More... | |
splitString ($delimiter) | |
Split string at given delimiter. More... | |
custom (callable $f) | |
Create a custom transformation. More... | |
toData ($type) | |
Transform primitive value to data-type. More... | |
Factory for basic transformations.
For purpose and usage see README.md
Definition at line 11 of file Factory.php.
ILIAS\Transformation\Factory::addLabels | ( | array | $labels | ) |
Add labels to an array.
Will transform ["a","b"] to ["A" => "a", "B" => "b"] with $labels = ["A", "B"].
string[] | $labels |
Definition at line 21 of file Factory.php.
ILIAS\Transformation\Factory::custom | ( | callable | $f | ) |
Create a custom transformation.
callable | $f | mixed -> mixed |
Definition at line 45 of file Factory.php.
ILIAS\Transformation\Factory::splitString | ( | $delimiter | ) |
Split string at given delimiter.
Will transform "a,b,c" to ["a", "b", "c"] with $delim = ",".
string | $delimiter |
Definition at line 34 of file Factory.php.
References $delimiter.
ILIAS\Transformation\Factory::toData | ( | $type | ) |
Transform primitive value to data-type.
string | $type |
Definition at line 56 of file Factory.php.
References $type.