ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Refinery\ConstraintViolationException Class Reference
+ Inheritance diagram for ILIAS\Refinery\ConstraintViolationException:
+ Collaboration diagram for ILIAS\Refinery\ConstraintViolationException:

Public Member Functions

 __construct (string $message, string $languageId,... $languageValues)
 Construct a violation on a constraint. More...
 
 getTranslatedMessage (callable $txt)
 

Private Attributes

string $languageId
 
array $languageValues
 

Detailed Description

Definition at line 29 of file ConstraintViolationException.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Refinery\ConstraintViolationException::__construct ( string  $message,
string  $languageId,
  $languageValues 
)

Construct a violation on a constraint.

Parameters
string$message- developer-readable message in english.
string$languageId- id of a human-readable string in the "violation" lng-module
mixed...$languageValues - values to be substituted in the lng-variable

Definition at line 41 of file ConstraintViolationException.php.

References ILIAS\Refinery\ConstraintViolationException\$languageId, ILIAS\Refinery\ConstraintViolationException\$languageValues, and ILIAS\GlobalScreen\Provider\__construct().

45  {
47 
48  $this->languageId = $languageId;
49  $this->languageValues = $languageValues;
50  }
__construct(Container $dic, ilPlugin $plugin)
$message
Definition: xapiexit.php:32
+ Here is the call graph for this function:

Member Function Documentation

◆ getTranslatedMessage()

ILIAS\Refinery\ConstraintViolationException::getTranslatedMessage ( callable  $txt)

Definition at line 52 of file ConstraintViolationException.php.

References $txt.

Referenced by ILIAS\Tests\Refinery\ConstraintViolationExceptionTest\testTranslationOfMessage().

52  : string
53  {
54  return vsprintf($txt($this->languageId), $this->languageValues);
55  }
$txt
Definition: error.php:13
+ Here is the caller graph for this function:

Field Documentation

◆ $languageId

string ILIAS\Refinery\ConstraintViolationException::$languageId
private

◆ $languageValues

array ILIAS\Refinery\ConstraintViolationException::$languageValues
private

The documentation for this class was generated from the following file: