ILIAS
release_8 Revision v8.19
◀ 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
n
o
p
r
s
t
u
v
w
x
+
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
j
l
m
p
s
t
u
+
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
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
Alphanumeric.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
6
11
namespace
ILIAS\Data
;
12
13
use
ILIAS\Refinery\ConstraintViolationException
;
14
15
class
Alphanumeric
16
{
20
private
$value
;
21
26
public
function
__construct
(
$value
)
27
{
28
$matches = null;
29
if
(!preg_match(
'/^[a-zA-Z0-9]+$/'
, (
string
)
$value
, $matches)) {
30
throw
new
ConstraintViolationException
(
31
sprintf(
'The value "%s" is not an alphanumeric value.'
, $value),
32
'exception_not_alphanumeric'
,
33
array($value)
34
);
35
}
36
37
$this->value =
$value
;
38
}
39
43
public
function
getValue
()
44
{
45
return
$this->value
;
46
}
47
48
public
function
asString
(): string
49
{
50
return
(
string
)
$this->value
;
51
}
52
}
ILIAS\Data\Alphanumeric\$value
$value
Definition:
Alphanumeric.php:20
ILIAS\Data\Alphanumeric\getValue
getValue()
Definition:
Alphanumeric.php:43
ILIAS\Data\Alphanumeric
Definition:
Alphanumeric.php:15
ILIAS\Refinery\ConstraintViolationException
Definition:
ConstraintViolationException.php:29
ILIAS\Data\Alphanumeric\__construct
__construct($value)
Definition:
Alphanumeric.php:26
ILIAS\Data\Alphanumeric\asString
asString()
Definition:
Alphanumeric.php:48
ConstraintViolationException
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\Data
Definition:
Alphanumeric.php:11
src
Data
Alphanumeric.php
Generated on Tue Apr 1 2025 22:02:41 for ILIAS by
1.8.13 (using
Doxyfile
)