ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDclInputException Class Reference
+ Inheritance diagram for ilDclInputException:
+ Collaboration diagram for ilDclInputException:

Public Member Functions

 __construct (int $exception_type, $additional_text="")
 
 getExceptionType ()
 
 __toString ()
 
- Public Member Functions inherited from ilException
 __construct ($a_message, $a_code=0)
 A code isn't optional as in build in class Exception. More...
 

Data Fields

const TYPE_EXCEPTION = 0
 
const LENGTH_EXCEPTION = 1
 
const REGEX_EXCEPTION = 2
 
const UNIQUE_EXCEPTION = 3
 
const NOT_URL = 4
 
const NOT_IMAGE = 5
 
const WRONG_FILE_TYPE = 6
 
const CUSTOM_MESSAGE = 7
 
const REGEX_CONFIG_EXCEPTION = 8
 

Protected Attributes

ilLanguage $lng
 
int $exception_type
 
string $additional_text
 

Detailed Description

Definition at line 21 of file ilDclInputException.php.

Constructor & Destructor Documentation

◆ __construct()

ilDclInputException::__construct ( int  $exception_type,
  $additional_text = "" 
)
Parameters
string$exception_type

Definition at line 40 of file ilDclInputException.php.

41 {
42 global $DIC;
43 $this->lng = $DIC->language();
44
45 $this->exception_type = $exception_type;
46 $this->additional_text = $additional_text;
48 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $additional_text, $DIC, $exception_type, ILIAS\GlobalScreen\Provider\__construct(), __toString(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilDclInputException::__toString ( )

Definition at line 55 of file ilDclInputException.php.

55 : string
56 {
57 switch ($this->exception_type) {
59 $message = $this->lng->txt('dcl_wrong_input_type');
60 break;
62 $message = $this->lng->txt('dcl_wrong_length');
63 break;
65 $message = $this->lng->txt('dcl_wrong_regex');
66 break;
68 $message = $this->lng->txt('dcl_invalid_regex_config');
69 break;
71 $message = $this->lng->txt('dcl_unique_exception');
72 break;
73 case self::NOT_URL:
74 $message = $this->lng->txt('dcl_noturl_exception');
75 break;
76 case self::NOT_IMAGE:
77 $message = $this->lng->txt('dcl_notimage_exception');
78 break;
80 $message = $this->lng->txt('dcl_not_supported_file_type');
81 break;
84 default:
85 $message = $this->lng->txt('dcl_unknown_exception');
86 }
87
88 if (strlen($this->additional_text) > 0) {
90 }
91
92 return $message;
93 }
$message
Definition: xapiexit.php:31

References $additional_text, $message, CUSTOM_MESSAGE, LENGTH_EXCEPTION, ILIAS\Repository\lng(), NOT_IMAGE, NOT_URL, REGEX_CONFIG_EXCEPTION, REGEX_EXCEPTION, TYPE_EXCEPTION, UNIQUE_EXCEPTION, and WRONG_FILE_TYPE.

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExceptionType()

ilDclInputException::getExceptionType ( )

Definition at line 50 of file ilDclInputException.php.

50 : int
51 {
53 }

References $exception_type.

Field Documentation

◆ $additional_text

string ilDclInputException::$additional_text
protected

Definition at line 35 of file ilDclInputException.php.

Referenced by __construct(), and __toString().

◆ $exception_type

int ilDclInputException::$exception_type
protected

Definition at line 34 of file ilDclInputException.php.

Referenced by __construct(), and getExceptionType().

◆ $lng

ilLanguage ilDclInputException::$lng
protected

Definition at line 32 of file ilDclInputException.php.

◆ CUSTOM_MESSAGE

const ilDclInputException::CUSTOM_MESSAGE = 7

Definition at line 30 of file ilDclInputException.php.

Referenced by __toString().

◆ LENGTH_EXCEPTION

const ilDclInputException::LENGTH_EXCEPTION = 1

Definition at line 24 of file ilDclInputException.php.

Referenced by __toString(), and ilDclTextFieldModel\checkRegexAndLength().

◆ NOT_IMAGE

const ilDclInputException::NOT_IMAGE = 5

Definition at line 28 of file ilDclInputException.php.

Referenced by __toString().

◆ NOT_URL

const ilDclInputException::NOT_URL = 4

Definition at line 27 of file ilDclInputException.php.

Referenced by __toString(), and ilDclTextFieldModel\checkValidity().

◆ REGEX_CONFIG_EXCEPTION

const ilDclInputException::REGEX_CONFIG_EXCEPTION = 8

Definition at line 31 of file ilDclInputException.php.

Referenced by __toString(), and ilDclTextFieldModel\checkRegexAndLength().

◆ REGEX_EXCEPTION

const ilDclInputException::REGEX_EXCEPTION = 2

Definition at line 25 of file ilDclInputException.php.

Referenced by __toString(), and ilDclTextFieldModel\checkRegexAndLength().

◆ TYPE_EXCEPTION

const ilDclInputException::TYPE_EXCEPTION = 0

◆ UNIQUE_EXCEPTION

const ilDclInputException::UNIQUE_EXCEPTION = 3

Definition at line 26 of file ilDclInputException.php.

Referenced by __toString(), and ilDclBaseFieldModel\checkUnique().

◆ WRONG_FILE_TYPE

const ilDclInputException::WRONG_FILE_TYPE = 6

Definition at line 29 of file ilDclInputException.php.

Referenced by __toString().


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