ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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.

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

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

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

References $exception_type.

{
$this->exception_type = $exception_type;
}

Member Function Documentation

ilDataCollectionInputException::__toString ( )
Returns
string

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

References $lng.

{
global $lng;
switch ($this->exception_type) {
case self::TYPE_EXCEPTION:
return $lng->txt('dcl_wrong_input_type');
case self::LENGTH_EXCEPTION:
return $lng->txt('dcl_wrong_length');
case self::REGEX_EXCEPTION:
return $lng->txt('dcl_wrong_regex');
case self::UNIQUE_EXCEPTION:
return $lng->txt('dcl_unique_exception');
case self::NOT_URL:
return $lng->txt('dcl_noturl_exception');
case self::NOT_IMAGE:
return $lng->txt('dcl_notimage_exception');
default:
return $lng->txt('dcl_unknown_exception');
}
}
ilDataCollectionInputException::getExceptionType ( )
Returns
string

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

References $exception_type.

{
}

Field Documentation

ilDataCollectionInputException::$exception_type
protected

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

Referenced by __construct(), and getExceptionType().

const ilDataCollectionInputException::LENGTH_EXCEPTION = 1
const ilDataCollectionInputException::NOT_IMAGE = 5

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

const ilDataCollectionInputException::NOT_URL = 4
const ilDataCollectionInputException::REGEX_EXCEPTION = 2
const ilDataCollectionInputException::TYPE_EXCEPTION = 0
const ilDataCollectionInputException::UNIQUE_EXCEPTION = 3

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