ILIAS  release_7 Revision v7.30-3-g800a261c036
ilDclInputException Class Reference

Class ilDclBaseFieldModel. More...

+ Inheritance diagram for ilDclInputException:
+ Collaboration diagram for ilDclInputException:

Public Member Functions

 __construct ($exception_type, $additional_text="")
 
 getExceptionType ()
 
 __toString ()
 
- Public Member Functions inherited from ilException
 __construct ($a_message, $a_code=0, Throwable $previous=null)
 A message 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

 $exception_type
 
 $additional_text
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 44 of file class.ilDclInputException.php.

45 {
47 $this->exception_type = $exception_type;
48 $this->additional_text = $additional_text;
49 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $additional_text, $exception_type, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilDclInputException::__toString ( )
Returns
string

Definition at line 64 of file class.ilDclInputException.php.

65 {
66 global $DIC;
67 $lng = $DIC['lng'];
68
69 switch ($this->exception_type) {
71 $message = $lng->txt('dcl_wrong_input_type');
72 break;
74 $message = $lng->txt('dcl_wrong_length');
75 break;
77 $message = $lng->txt('dcl_wrong_regex');
78 break;
80 $message = $lng->txt('dcl_invalid_regex_config');
81 break;
83 $message = $lng->txt('dcl_unique_exception');
84 break;
85 case self::NOT_URL:
86 $message = $lng->txt('dcl_noturl_exception');
87 break;
88 case self::NOT_IMAGE:
89 $message = $lng->txt('dcl_notimage_exception');
90 break;
92 $message = $lng->txt('dcl_not_supported_file_type');
93 break;
96 break;
97 default:
98 $message = $lng->txt('dcl_unknown_exception');
99 }
100
101 if (strlen($this->additional_text) > 0) {
103 }
104
105 return $message;
106 }
global $DIC
Definition: goto.php:24
$lng
$message
Definition: xapiexit.php:14

References $additional_text, $DIC, $lng, $message, CUSTOM_MESSAGE, LENGTH_EXCEPTION, NOT_IMAGE, NOT_URL, REGEX_CONFIG_EXCEPTION, REGEX_EXCEPTION, TYPE_EXCEPTION, UNIQUE_EXCEPTION, and WRONG_FILE_TYPE.

◆ getExceptionType()

ilDclInputException::getExceptionType ( )
Returns
string

Definition at line 55 of file class.ilDclInputException.php.

56 {
58 }

References $exception_type.

Field Documentation

◆ $additional_text

ilDclInputException::$additional_text
protected

Definition at line 38 of file class.ilDclInputException.php.

Referenced by __construct(), and __toString().

◆ $exception_type

ilDclInputException::$exception_type
protected

Definition at line 33 of file class.ilDclInputException.php.

Referenced by __construct(), and getExceptionType().

◆ CUSTOM_MESSAGE

const ilDclInputException::CUSTOM_MESSAGE = 7

Definition at line 26 of file class.ilDclInputException.php.

Referenced by __toString().

◆ LENGTH_EXCEPTION

const ilDclInputException::LENGTH_EXCEPTION = 1

◆ NOT_IMAGE

const ilDclInputException::NOT_IMAGE = 5

Definition at line 24 of file class.ilDclInputException.php.

Referenced by __toString().

◆ NOT_URL

const ilDclInputException::NOT_URL = 4

◆ REGEX_CONFIG_EXCEPTION

const ilDclInputException::REGEX_CONFIG_EXCEPTION = 8

◆ REGEX_EXCEPTION

const ilDclInputException::REGEX_EXCEPTION = 2

◆ TYPE_EXCEPTION

const ilDclInputException::TYPE_EXCEPTION = 0

◆ UNIQUE_EXCEPTION

◆ WRONG_FILE_TYPE

const ilDclInputException::WRONG_FILE_TYPE = 6

Definition at line 25 of file class.ilDclInputException.php.

Referenced by __toString().


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