ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Refinery\Transformation
 transform ($from)
 Perform the transformation. More...
 
 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)

@inheritDoc

Implements ILIAS\Refinery\Transformation.

Definition at line 60 of file Parallel.php.

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

References $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: