ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
GreaterThan.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
GreaterThan
extends
Custom
implements
Constraint
11
{
15
protected
$min
;
16
17
public
function
__construct
(
$min
, Data\
Factory
$data_factory
)
18
{
19
assert(
'is_int($min)'
);
20
$this->min =
$min
;
21
parent::__construct(
22
function
($value) {
23
return
$value >
$this->min
;
24
},
25
function
($value) {
26
return
"'$value' is not greater than '{$this->min}'."
;
27
},
28
$data_factory
29
);
30
}
31
}
ILIAS\Data\Result
Definition:
Error.php:4
ILIAS\Validation\Constraints\GreaterThan\$min
$min
Definition:
GreaterThan.php:15
ILIAS\Validation\Constraint
A constraint encodes some resrtictions on values.
Definition:
Constraint.php:14
Constraint
ILIAS\Validation\Constraints\GreaterThan\__construct
__construct($min, Data\Factory $data_factory)
Definition:
GreaterThan.php:17
ILIAS\Validation\Constraints\GreaterThan
Definition:
GreaterThan.php:10
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:14
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\Data
Definition:
ClientId.php:4
src
Validation
Constraints
GreaterThan.php
Generated on Sat Jan 18 2025 19:01:43 for ILIAS by
1.8.13 (using
Doxyfile
)