ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 
28 {
36 
42  public function __construct(array $constraints, Data\Factory $data_factory, \ILIAS\Language\Language $lng)
43  {
45  function ($value) use ($constraints): bool {
46  foreach ($constraints as $constraint) {
47  if (!$constraint->accepts($value)) {
48  $this->failed_constraint = $constraint;
49  return false;
50  }
51  }
52 
53  return true;
54  },
55  function ($txt, $value): string {
56  return $this->failed_constraint->getErrorMessage($value);
57  },
58  $data_factory,
59  $lng
60  );
61  }
62 }
Interface Observer Contains several chained tasks and infos about them.
A constraint encodes some resrtictions on values.
Definition: Constraint.php:31
__construct(array $constraints, Data\Factory $data_factory, \ILIAS\Language\Language $lng)
Definition: Sequential.php:42
Builds data types.
Definition: Factory.php:35
$txt
Definition: error.php:31
__construct(Container $dic, ilPlugin $plugin)
global $lng
Definition: privfeed.php:31