ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilDclInputException Class Reference
+ Inheritance diagram for ilDclInputException:
+ Collaboration diagram for ilDclInputException:

Public Member Functions

 __construct (int $exception_type)
 
 __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 REGEX_CONFIG_EXCEPTION = 8
 

Protected Attributes

ilLanguage $lng
 
int $exception_type
 

Detailed Description

Definition at line 21 of file ilDclInputException.php.

Constructor & Destructor Documentation

◆ __construct()

ilDclInputException::__construct ( int  $exception_type)

Definition at line 32 of file ilDclInputException.php.

33 {
34 global $DIC;
35 $this->lng = $DIC->language();
36
37 $this->exception_type = $exception_type;
39 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $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 41 of file ilDclInputException.php.

41 : string
42 {
43 switch ($this->exception_type) {
45 return $this->lng->txt('dcl_wrong_input_type');
47 return $this->lng->txt('dcl_wrong_length');
49 return $this->lng->txt('dcl_wrong_regex');
51 return $this->lng->txt('dcl_invalid_regex_config');
53 return $this->lng->txt('dcl_unique_exception');
54 case self::NOT_URL:
55 return $this->lng->txt('dcl_noturl_exception');
56 default:
57 return $this->lng->txt('dcl_unknown_exception');
58 }
59 }

References LENGTH_EXCEPTION, ILIAS\Repository\lng(), NOT_URL, REGEX_CONFIG_EXCEPTION, REGEX_EXCEPTION, TYPE_EXCEPTION, and UNIQUE_EXCEPTION.

Referenced by __construct().

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

Field Documentation

◆ $exception_type

int ilDclInputException::$exception_type
protected

Definition at line 30 of file ilDclInputException.php.

Referenced by __construct().

◆ $lng

ilLanguage ilDclInputException::$lng
protected

Definition at line 29 of file ilDclInputException.php.

◆ LENGTH_EXCEPTION

const ilDclInputException::LENGTH_EXCEPTION = 1

Definition at line 24 of file ilDclInputException.php.

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

◆ 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 28 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().


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