ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
IsInt.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 
7 use ILIAS\Data;
9 
10 class IsInt extends Custom implements Constraint
11 {
13  {
14  parent::__construct(
15  function ($value) {
16  return is_int($value);
17  },
18  function ($txt, $value) {
19  return $txt("not_an_int", $value);
20  },
22  $lng
23  );
24  }
25 }
A constraint encodes some resrtictions on values.
Definition: Constraint.php:14
Builds data types.
Definition: Factory.php:14
$txt
Definition: error.php:11
__construct(Data\Factory $data_factory, \ilLanguage $lng)
Definition: IsInt.php:12
language handling