ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Refinery\Logical\Parallel Class Reference
+ Inheritance diagram for ILIAS\Refinery\Logical\Parallel:
+ Collaboration diagram for ILIAS\Refinery\Logical\Parallel:

Public Member Functions

 __construct (array $constraints, Data\Factory $data_factory, \ilLanguage $lng)
 
- Public Member Functions inherited from ILIAS\Refinery\Constraint
 check ($value)
 Checks the provided value. More...
 
 accepts ($value)
 Tells if the provided value complies. More...
 
 problemWith ($value)
 Tells what the problem with the provided value is. More...
 
 applyTo (Result $result)
 Restricts a Result. More...
 
 withProblemBuilder (callable $builder)
 Get a constraint like this one with a builder for a custom error message. More...
 
- Public Member Functions inherited from ILIAS\Refinery\Transformation
 transform ($from)
 Perform the transformation. More...
 
 __invoke ($from)
 Transformations should be callable. More...
 

Protected Attributes

 $constraints
 
 $failed_constraints
 

Detailed Description

Definition at line 9 of file Parallel.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Refinery\Logical\Parallel::__construct ( array  $constraints,
Data\Factory  $data_factory,
\ilLanguage  $lng 
)

Definition at line 24 of file Parallel.php.

References ILIAS\Refinery\Logical\Parallel\$constraints, $lng, $messages, $ret, $txt, and ILIAS\GlobalScreen\Provider\__construct().

25  {
26  $this->constraints = $constraints;
28  function ($value) {
29  $ret = true;
30  $this->failed_constraints = array();
31  foreach ($this->constraints as $constraint) {
32  if (!$constraint->accepts($value)) {
33  $this->failed_constraints[] = $constraint;
34  $ret = false;
35  }
36  }
37 
38  return $ret;
39  },
40  function ($txt, $value) {
41  $messages = [];
42  foreach ($this->failed_constraints as $key => $constraint) {
43  $messages[] = $constraint->getErrorMessage($value);
44  }
45 
46  return implode(" ", $messages);
47  },
48  $data_factory,
49  $lng
50  );
51  }
$messages
Definition: xapiexit.php:5
$lng
$txt
Definition: error.php:13
__construct(Container $dic, ilPlugin $plugin)
$ret
Definition: parser.php:6
+ Here is the call graph for this function:

Field Documentation

◆ $constraints

ILIAS\Refinery\Logical\Parallel::$constraints
protected

Definition at line 14 of file Parallel.php.

Referenced by ILIAS\Refinery\Logical\Parallel\__construct().

◆ $failed_constraints

ILIAS\Refinery\Logical\Parallel::$failed_constraints
protected

Definition at line 22 of file Parallel.php.


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