ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 class.ilDclInputException.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

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

41  {
42  global $DIC;
43  $this->lng = $DIC->language();
44 
45  $this->exception_type = $exception_type;
46  $this->additional_text = $additional_text;
48  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilDclInputException::__toString ( )

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

References $additional_text, $message, and ILIAS\Repository\lng().

Referenced by __construct().

55  : string
56  {
57  switch ($this->exception_type) {
58  case self::TYPE_EXCEPTION:
59  $message = $this->lng->txt('dcl_wrong_input_type');
60  break;
61  case self::LENGTH_EXCEPTION:
62  $message = $this->lng->txt('dcl_wrong_length');
63  break;
64  case self::REGEX_EXCEPTION:
65  $message = $this->lng->txt('dcl_wrong_regex');
66  break;
67  case self::REGEX_CONFIG_EXCEPTION:
68  $message = $this->lng->txt('dcl_invalid_regex_config');
69  break;
70  case self::UNIQUE_EXCEPTION:
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;
79  case self::WRONG_FILE_TYPE:
80  $message = $this->lng->txt('dcl_not_supported_file_type');
81  break;
82  case self::CUSTOM_MESSAGE:
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
+ 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 class.ilDclInputException.php.

References $exception_type.

50  : int
51  {
52  return $this->exception_type;
53  }

Field Documentation

◆ $additional_text

string ilDclInputException::$additional_text
protected

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

Referenced by __construct(), and __toString().

◆ $exception_type

int ilDclInputException::$exception_type
protected

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

Referenced by __construct(), and getExceptionType().

◆ $lng

ilLanguage ilDclInputException::$lng
protected

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

◆ CUSTOM_MESSAGE

const ilDclInputException::CUSTOM_MESSAGE = 7

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

◆ LENGTH_EXCEPTION

const ilDclInputException::LENGTH_EXCEPTION = 1

◆ NOT_IMAGE

const ilDclInputException::NOT_IMAGE = 5

Definition at line 28 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

◆ UNIQUE_EXCEPTION

const ilDclInputException::UNIQUE_EXCEPTION = 3

◆ WRONG_FILE_TYPE

const ilDclInputException::WRONG_FILE_TYPE = 6

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


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