ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
ConstraintViolationException.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8
namespace
ILIAS\Refinery
;
9
10
/***
11
* Signals the violation of some constraint on a value in a way that can be subject
12
* to i18n.
13
*/
14
class
ConstraintViolationException
extends
\UnexpectedValueException
15
{
19
private
$languageId
;
20
24
private
$languageValues
;
25
33
public
function
__construct
(
34
string
$message
,
35
string
$languageId
,
36
...
$languageValues
37
) {
38
parent::__construct
($message);
39
40
$this->languageId =
$languageId
;
41
$this->languageValues =
$languageValues
;
42
}
43
48
public
function
getTranslatedMessage
(callable
$txt
)
49
{
50
return
vsprintf(
$txt
($this->languageId), $this->languageValues);
51
}
52
}
UnexpectedValueException
ILIAS\Refinery
Definition:
ByTrying.php:5
ILIAS\Refinery\ConstraintViolationException\$languageId
$languageId
Definition:
ConstraintViolationException.php:19
ILIAS\Refinery\ConstraintViolationException
Definition:
ConstraintViolationException.php:14
$txt
$txt
Definition:
error.php:13
ILIAS\Refinery\ConstraintViolationException\__construct
__construct(string $message, string $languageId,... $languageValues)
Construct a violation on a constraint.
Definition:
ConstraintViolationException.php:33
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:40
ILIAS\Refinery\ConstraintViolationException\getTranslatedMessage
getTranslatedMessage(callable $txt)
Definition:
ConstraintViolationException.php:48
ILIAS\Refinery\ConstraintViolationException\$languageValues
$languageValues
Definition:
ConstraintViolationException.php:24
$message
$message
Definition:
xapiexit.php:14
src
Refinery
ConstraintViolationException.php
Generated on Sun Aug 31 2025 21:01:39 for ILIAS by
1.8.13 (using
Doxyfile
)