ILIAS  release_7 Revision v7.30-3-g800a261c036
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

 $languageId
 
 $languageValues
 

Detailed Description

Definition at line 14 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 33 of file ConstraintViolationException.php.

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getTranslatedMessage()

ILIAS\Refinery\ConstraintViolationException::getTranslatedMessage ( callable  $txt)
Parameters
callable$txt
Returns
string

Definition at line 48 of file ConstraintViolationException.php.

References $txt.

49  {
50  return vsprintf($txt($this->languageId), $this->languageValues);
51  }
$txt
Definition: error.php:13

Field Documentation

◆ $languageId

ILIAS\Refinery\ConstraintViolationException::$languageId
private

◆ $languageValues

ILIAS\Refinery\ConstraintViolationException::$languageValues
private

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