ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
HasSpecialChars.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 2018 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3
4
namespace
ILIAS\Refinery\Password
;
5
6
use
ILIAS\Refinery\Custom\Constraint
as
CustomConstraint
;
7
use
ILIAS\Refinery\Constraint
;
8
use
ILIAS\Data
;
9
10
class
HasSpecialChars
extends
CustomConstraint
implements
Constraint
11
{
12
protected
static
$ALLOWED_CHARS
=
'/[,_.\-#\+\*?!%ยง\(\)\$]/'
;
13
14
public
function
__construct
(Data\
Factory
$data_factory
, \
ilLanguage
$lng
)
15
{
16
parent::__construct
(
17
function
(Data\
Password
$value) {
18
return
(
bool
) preg_match(static::$ALLOWED_CHARS, $value->toString());
19
},
20
function
($value) {
21
return
"Password must contain special chars."
;
22
},
23
$data_factory
,
24
$lng
25
);
26
}
27
}
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\Password\HasSpecialChars\__construct
__construct(Data\Factory $data_factory, \ilLanguage $lng)
Definition:
HasSpecialChars.php:14
ILIAS\Data\Password
A password is used as part of credentials for authentication.
Definition:
Password.php:13
Constraint
ILIAS\Refinery\Custom\Constraint\$lng
$lng
Definition:
Constraint.php:27
ILIAS\Refinery\Password
Definition:
Group.php:4
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:19
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:40
ILIAS\Refinery\Password\HasSpecialChars
Definition:
HasSpecialChars.php:10
ILIAS\Refinery\Password\HasSpecialChars\$ALLOWED_CHARS
static $ALLOWED_CHARS
Definition:
HasSpecialChars.php:12
Constraint
ILIAS\Data
Definition:
Alphanumeric.php:10
src
Refinery
Password
HasSpecialChars.php
Generated on Sun Aug 31 2025 21:01:39 for ILIAS by
1.8.13 (using
Doxyfile
)