ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
Not.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 2017 Stefan Hecken <stefan.hecken@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3 
4 namespace ILIAS\Refinery\Logical;
5 
7 use ILIAS\Data;
8 
9 class Not extends Constraint
10 {
14  protected $constraint;
15 
16  public function __construct(Constraint $constraint, Data\Factory $data_factory, \ilLanguage $lng)
17  {
18  $this->constraint = $constraint;
20  function ($value) {
21  return !$this->constraint->accepts($value);
22  },
23  function ($txt, $value) {
24  return $txt("not_generic", $this->constraint->getErrorMessage($value));
25  },
26  $data_factory,
27  $lng
28  );
29  }
30 }
A constraint encodes some resrtictions on values.
Definition: Constraint.php:14
$lng
Builds data types.
Definition: Factory.php:19
$txt
Definition: error.php:13
__construct(Container $dic, ilPlugin $plugin)
__construct(Constraint $constraint, Data\Factory $data_factory, \ilLanguage $lng)
Definition: Not.php:16
language handling