ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Group.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Refinery\Container;
22 
25 
26 class Group
27 {
29 
30  public function __construct(Factory $dataFactory)
31  {
32  $this->dataFactory = $dataFactory;
33  }
34 
40  public function addLabels(array $labels): Transformation
41  {
42  return new AddLabels($labels, $this->dataFactory);
43  }
44 
49  public function mapValues(Transformation $trafo): Transformation
50  {
51  return new MapValues($trafo);
52  }
53 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Builds data types.
Definition: Factory.php:35
addLabels(array $labels)
Adds to any array keys for each value.
Definition: Group.php:40
A transformation is a function from one datatype to another.
mapValues(Transformation $trafo)
Returns a transformation which applies the given transformation to the element of the array passed to...
Definition: Group.php:49