ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Refinery\In\Parallel Class Reference
+ Inheritance diagram for ILIAS\Refinery\In\Parallel:
+ Collaboration diagram for ILIAS\Refinery\In\Parallel:

Public Member Functions

 __construct (array $transformations)
 
 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...
 

Private Attributes

array $transformationStrategies
 

Detailed Description

Definition at line 29 of file Parallel.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Refinery\In\Parallel::__construct ( array  $transformations)
Parameters
Transformation[]$transformations
Exceptions
InvalidArgumentException

Definition at line 41 of file Parallel.php.

42  {
43  foreach ($transformations as $transformation) {
44  if (!$transformation instanceof Transformation) {
45  $transformationClassName = Transformation::class;
46 
47  throw new ConstraintViolationException(
48  sprintf('The array MUST contain only "%s" instances', $transformationClassName),
49  'not_a_transformation',
50  $transformationClassName
51  );
52  }
53  }
54  $this->transformationStrategies = $transformations;
55  }

Member Function Documentation

◆ transform()

ILIAS\Refinery\In\Parallel::transform (   $from)

Implements ILIAS\Refinery\Transformation.

Definition at line 60 of file Parallel.php.

References $results.

60  : array
61  {
62  $results = [];
63  foreach ($this->transformationStrategies as $strategy) {
64  $results[] = $strategy->transform($from);
65  }
66 
67  return $results;
68  }
$results

Field Documentation

◆ $transformationStrategies

array ILIAS\Refinery\In\Parallel::$transformationStrategies
private

Definition at line 35 of file Parallel.php.


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