ILIAS  release_4-4 Revision
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
 

Private Attributes

 $exception_type
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDataCollectionInputException::__construct (   $exception_type)

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

References $exception_type.

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

Member Function Documentation

◆ __toString()

ilDataCollectionInputException::__toString ( )

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

References $lng.

49  {
50  global $lng;
51 
52  switch($this->exception_type)
53  {
54  case self::TYPE_EXCEPTION:
55  return $lng->txt("dcl_wrong_input_type");
56  case self::LENGTH_EXCEPTION:
57  return $lng->txt("dcl_wrong_length");
58  case self::REGEX_EXCEPTION:
59  return $lng->txt("dcl_wrong_regex");
60  case self::UNIQUE_EXCEPTION:
61  return $lng->txt("dcl_unique_exception");
62  case self::NOT_URL:
63  return $lng->txt("dcl_noturl_exception");
64  case self::NOT_IMAGE:
65  return $lng->txt("dcl_notimage_exception");
66  default:
67  return $lng->txt("dcl_unknown_exception");
68  }
69  }
global $lng
Definition: privfeed.php:40

◆ getExceptionType()

ilDataCollectionInputException::getExceptionType ( )

Field Documentation

◆ $exception_type

ilDataCollectionInputException::$exception_type
private

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

Referenced by __construct(), and getExceptionType().

◆ LENGTH_EXCEPTION

const ilDataCollectionInputException::LENGTH_EXCEPTION = 1

◆ NOT_IMAGE

const ilDataCollectionInputException::NOT_IMAGE = 5

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