ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
IsNull.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 2018 Fabian Schmid <fs@studer-raimann.ch> Extended GPL, see docs/LICENSE */
3 
5 
7 use ILIAS\Data;
9 
17 class IsNull extends Custom implements Constraint
18 {
19 
26  {
27  parent::__construct(
28  function ($value) {
29  return is_null($value);
30  },
31  function ($txt, $value) {
32  return $txt("not_a_null", gettype($value));
33  },
35  $lng
36  );
37  }
38 }
A constraint encodes some resrtictions on values.
Definition: Constraint.php:14
Builds data types.
Definition: Factory.php:14
__construct(Data\Factory $data_factory, \ilLanguage $lng)
IsNull constructor.
Definition: IsNull.php:25
$txt
Definition: error.php:11
language handling