ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
Sequential.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Refinery\Logical;
22 
25 use ILIAS\Data;
26 use ilLanguage;
27 
29 {
37 
43  public function __construct(array $constraints, Data\Factory $data_factory, ilLanguage $lng)
44  {
46  function ($value) use ($constraints): bool {
47  foreach ($constraints as $constraint) {
48  if (!$constraint->accepts($value)) {
49  $this->failed_constraint = $constraint;
50  return false;
51  }
52  }
53 
54  return true;
55  },
56  function ($txt, $value): string {
57  return $this->failed_constraint->getErrorMessage($value);
58  },
60  $lng
61  );
62  }
63 }
__construct(array $constraints, Data\Factory $data_factory, ilLanguage $lng)
Definition: Sequential.php:43
A constraint encodes some resrtictions on values.
Definition: Constraint.php:31
__construct(VocabulariesInterface $vocabularies)
$txt
Definition: error.php:14
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...