ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

References $exception_type.

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

Member Function Documentation

◆ __toString()

ilDataCollectionInputException::__toString ( )
Returns
string

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

References $lng.

51  {
52  global $lng;
53 
54  switch ($this->exception_type) {
55  case self::TYPE_EXCEPTION:
56  return $lng->txt('dcl_wrong_input_type');
57  case self::LENGTH_EXCEPTION:
58  return $lng->txt('dcl_wrong_length');
59  case self::REGEX_EXCEPTION:
60  return $lng->txt('dcl_wrong_regex');
61  case self::UNIQUE_EXCEPTION:
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

◆ getExceptionType()

ilDataCollectionInputException::getExceptionType ( )
Returns
string

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

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.

◆ 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: