ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilDataCollectionInputException Class Reference

Class ilDataCollectionField. More...

+ Inheritance diagram for ilDataCollectionInputException:
+ Collaboration diagram for ilDataCollectionInputException:

Public Member Functions

 __construct ($exception_type)
 
 getExceptionType ()
 
 __toString ()
 
- Public Member Functions inherited from ilException
 __construct ($a_message, $a_code=0)
 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
 

Protected Attributes

 $exception_type
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDataCollectionInputException::__construct (   $exception_type)
Parameters
string$exception_type

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

34 {
35 parent::__construct($exception_type);
36 $this->exception_type = $exception_type;
37 }

References $exception_type.

Member Function Documentation

◆ __toString()

ilDataCollectionInputException::__toString ( )
Returns
string

Definition at line 51 of file class.ilDataCollectionInputException.php.

51 {
52 global $lng;
53
54 switch ($this->exception_type) {
56 return $lng->txt('dcl_wrong_input_type');
58 return $lng->txt('dcl_wrong_length');
60 return $lng->txt('dcl_wrong_regex');
62 return $lng->txt('dcl_unique_exception');
63 case self::NOT_URL:
64 return $lng->txt('dcl_noturl_exception');
65 case self::NOT_IMAGE:
66 return $lng->txt('dcl_notimage_exception');
67 default:
68 return $lng->txt('dcl_unknown_exception');
69 }
70 }
global $lng
Definition: privfeed.php:40

References $lng, LENGTH_EXCEPTION, NOT_IMAGE, NOT_URL, REGEX_EXCEPTION, TYPE_EXCEPTION, and UNIQUE_EXCEPTION.

◆ getExceptionType()

ilDataCollectionInputException::getExceptionType ( )
Returns
string

Definition at line 43 of file class.ilDataCollectionInputException.php.

43 {
45 }

References $exception_type.

Field Documentation

◆ $exception_type

ilDataCollectionInputException::$exception_type
protected

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

Referenced by __construct(), and getExceptionType().

◆ LENGTH_EXCEPTION

const ilDataCollectionInputException::LENGTH_EXCEPTION = 1

◆ NOT_IMAGE

const ilDataCollectionInputException::NOT_IMAGE = 5

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

Referenced by __toString().

◆ NOT_URL

const ilDataCollectionInputException::NOT_URL = 4

◆ REGEX_EXCEPTION

const ilDataCollectionInputException::REGEX_EXCEPTION = 2

◆ TYPE_EXCEPTION

const ilDataCollectionInputException::TYPE_EXCEPTION = 0

◆ UNIQUE_EXCEPTION

const ilDataCollectionInputException::UNIQUE_EXCEPTION = 3

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