ILIAS  release_7 Revision v7.30-3-g800a261c036
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
5
7use ILIAS\Data;
8
9class 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}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
__construct(Constraint $constraint, Data\Factory $data_factory, \ilLanguage $lng)
Definition: Not.php:16
language handling
$txt
Definition: error.php:13
A constraint encodes some resrtictions on values.
Definition: Constraint.php:15
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$lng