ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclInputException Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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 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

string $exception_type
 
string $additional_text
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

38  {
39  $this->exception_type = $exception_type;
40  $this->additional_text = $additional_text;
42  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilDclInputException::__toString ( )

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

References $additional_text, $DIC, $lng, and $message.

Referenced by __construct().

49  : string
50  {
51  global $DIC;
52  $lng = $DIC['lng'];
53 
54  switch ($this->exception_type) {
55  case self::TYPE_EXCEPTION:
56  $message = $lng->txt('dcl_wrong_input_type');
57  break;
58  case self::LENGTH_EXCEPTION:
59  $message = $lng->txt('dcl_wrong_length');
60  break;
61  case self::REGEX_EXCEPTION:
62  $message = $lng->txt('dcl_wrong_regex');
63  break;
64  case self::REGEX_CONFIG_EXCEPTION:
65  $message = $lng->txt('dcl_invalid_regex_config');
66  break;
67  case self::UNIQUE_EXCEPTION:
68  $message = $lng->txt('dcl_unique_exception');
69  break;
70  case self::NOT_URL:
71  $message = $lng->txt('dcl_noturl_exception');
72  break;
73  case self::NOT_IMAGE:
74  $message = $lng->txt('dcl_notimage_exception');
75  break;
76  case self::WRONG_FILE_TYPE:
77  $message = $lng->txt('dcl_not_supported_file_type');
78  break;
79  case self::CUSTOM_MESSAGE:
81  break;
82  default:
83  $message = $lng->txt('dcl_unknown_exception');
84  }
85 
86  if (strlen($this->additional_text) > 0) {
88  }
89 
90  return $message;
91  }
$lng
global $DIC
Definition: feed.php:28
$message
Definition: xapiexit.php:32
+ Here is the caller graph for this function:

◆ getExceptionType()

ilDclInputException::getExceptionType ( )

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

References $exception_type.

44  : string
45  {
46  return $this->exception_type;
47  }

Field Documentation

◆ $additional_text

string ilDclInputException::$additional_text
protected

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

Referenced by __construct(), and __toString().

◆ $exception_type

string ilDclInputException::$exception_type
protected

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

Referenced by __construct(), and getExceptionType().

◆ CUSTOM_MESSAGE

const ilDclInputException::CUSTOM_MESSAGE = 7

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

◆ LENGTH_EXCEPTION

const ilDclInputException::LENGTH_EXCEPTION = 1

◆ NOT_IMAGE

const ilDclInputException::NOT_IMAGE = 5

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

◆ 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

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

Referenced by ilDclNumberFieldModel\checkValidity().

◆ UNIQUE_EXCEPTION

◆ WRONG_FILE_TYPE

const ilDclInputException::WRONG_FILE_TYPE = 6

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


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