ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\UI\Implementation\Component\Input\Container\Container\MapValues Class Reference

Adds to any array keys for each value. More...

+ Inheritance diagram for ILIAS\UI\Implementation\Component\Input\Container\Container\MapValues:
+ Collaboration diagram for ILIAS\UI\Implementation\Component\Input\Container\Container\MapValues:

Public Member Functions

 __construct (Transformation $trafo)
 
 transform ($from)
 
- Public Member Functions inherited from ILIAS\Refinery\Transformation
 applyTo (Result $result)
 Perform the transformation and reify possible failures. More...
 
 __invoke ($from)
 Transformations should be callable. More...
 

Protected Attributes

string $type
 

Private Attributes

Transformation $trafo
 

Detailed Description

Adds to any array keys for each value.

Definition at line 31 of file MapValues.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\UI\Implementation\Component\Input\Container\Container\MapValues::__construct ( Transformation  $trafo)

Member Function Documentation

◆ transform()

ILIAS\UI\Implementation\Component\Input\Container\Container\MapValues::transform (   $from)

Implements ILIAS\Refinery\Transformation.

Definition at line 47 of file MapValues.php.

References Vendor\Package\$a.

47  : array
48  {
49  if (!is_array($from)) {
50  throw new InvalidArgumentException(__METHOD__ . " argument is not an array.");
51  }
52 
53  return array_map(function ($a) {
54  return $this->trafo->transform($a);
55  }, $from);
56  }
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples

Field Documentation

◆ $trafo

Transformation ILIAS\UI\Implementation\Component\Input\Container\Container\MapValues::$trafo
private

◆ $type

string ILIAS\UI\Implementation\Component\Input\Container\Container\MapValues::$type
protected

Definition at line 36 of file MapValues.php.


The documentation for this class was generated from the following file: