ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Not.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Refinery\Logical;
22 
24 use ILIAS\Data;
25 
26 class Not extends Constraint
27 {
28  public function __construct(Constraint $constraint, Data\Factory $data_factory, \ILIAS\Language\Language $lng)
29  {
31  static function ($value) use ($constraint) {
32  return !$constraint->accepts($value);
33  },
34  static function ($txt, $value) use ($constraint): string {
35  return (string) $txt("not_generic", $constraint->getErrorMessage($value));
36  },
37  $data_factory,
38  $lng
39  );
40  }
41 }
Interface Observer Contains several chained tasks and infos about them.
A constraint encodes some resrtictions on values.
Definition: Constraint.php:31
__construct(Constraint $constraint, Data\Factory $data_factory, \ILIAS\Language\Language $lng)
Definition: Not.php:28
Builds data types.
Definition: Factory.php:35
$txt
Definition: error.php:31
accepts($value)
Tells if the provided value complies.
__construct(Container $dic, ilPlugin $plugin)
global $lng
Definition: privfeed.php:31