ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
LessThan.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\Validation\Constraints
;
5
6
use
ILIAS\Validation\Constraint
;
7
use
ILIAS\Data
;
8
use
ILIAS\Data\Result
;
9
10
class
LessThan
extends
Custom
implements
Constraint
11
{
15
protected
$max
;
16
17
public
function
__construct
(
int
$max
, Data\
Factory
$data_factory
, \
ilLanguage
$lng
)
18
{
19
$this->max =
$max
;
20
parent::__construct(
21
function
($value) {
22
return
$value <
$this->max
;
23
},
24
function
(
$txt
, $value) {
25
return
$txt
(
"not_less_than"
, $value, $this->max);
26
},
27
$data_factory
,
28
$lng
29
);
30
}
31
}
ILIAS\Validation\Constraints\LessThan\$max
$max
Definition:
LessThan.php:15
ILIAS\Data\Result
Definition:
Error.php:4
ILIAS\Validation\Constraint
A constraint encodes some resrtictions on values.
Definition:
Constraint.php:14
ILIAS\Validation\Constraints\Custom\$lng
$lng
Definition:
Custom.php:20
Constraint
ILIAS\Validation\Constraints\LessThan\__construct
__construct(int $max, Data\Factory $data_factory, \ilLanguage $lng)
Definition:
LessThan.php:17
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:14
$txt
$txt
Definition:
error.php:11
ILIAS\Validation\Constraints\Custom
Definition:
Custom.php:10
ILIAS\Validation\Constraints
Definition:
Custom.php:4
ILIAS\Validation\Constraints\Custom\$data_factory
$data_factory
Definition:
Custom.php:15
ILIAS\Validation\Constraints\LessThan
Definition:
LessThan.php:10
ilLanguage
language handling
Definition:
class.ilLanguage.php:26
php
ILIAS\Data
Definition:
ClientId.php:4
src
Validation
Constraints
LessThan.php
Generated on Thu Jan 16 2025 19:02:38 for ILIAS by
1.8.13 (using
Doxyfile
)