ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
IsNumeric.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 2017 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see
3
docs/LICENSE */
4
5
namespace
ILIAS\Refinery\Numeric
;
6
7
use
ILIAS\Refinery\Constraint
;
8
use
ILIAS\Refinery\Custom\Constraint
as
CustomConstraint
;
9
use
ILIAS\Data
;
10
11
class
IsNumeric
extends
CustomConstraint
implements
Constraint
12
{
13
public
function
__construct
(Data\
Factory
$data_factory
, \
ilLanguage
$lng
)
14
{
15
parent::__construct
(
16
function
($value) {
17
return
is_numeric($value);
18
},
19
function
(
$txt
, $value) {
20
if
(
''
=== $value) {
21
return
$txt
(
"not_numeric_empty_string"
);
22
}
23
24
return
$txt
(
"not_numeric"
, $value);
25
},
26
$data_factory
,
27
$lng
28
);
29
}
30
}
ILIAS\Refinery\Custom\Constraint\$data_factory
$data_factory
Definition:
Constraint.php:22
ilLanguage
ILIAS\Refinery\Constraint
A constraint encodes some resrtictions on values.
Definition:
Constraint.php:14
ILIAS\Refinery\Numeric
Definition:
Group.php:4
Constraint
ILIAS\Refinery\Numeric\IsNumeric
Definition:
IsNumeric.php:11
ILIAS\Refinery\Custom\Constraint\$lng
$lng
Definition:
Constraint.php:27
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:19
$txt
$txt
Definition:
error.php:13
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:40
ILIAS\Refinery\Numeric\IsNumeric\__construct
__construct(Data\Factory $data_factory, \ilLanguage $lng)
Definition:
IsNumeric.php:13
Constraint
ILIAS\Data
Definition:
Alphanumeric.php:10
src
Refinery
Numeric
IsNumeric.php
Generated on Tue Apr 8 2025 21:02:12 for ILIAS by
1.8.13 (using
Doxyfile
)