ILIAS
release_4-4 Revision
◀ ilDoc Overview
class.ilDataCollectionInputException.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'./Services/Exceptions/classes/class.ilException.php'
;
5
17
class
ilDataCollectionInputException
extends
ilException
18
{
19
const
TYPE_EXCEPTION
= 0;
20
const
LENGTH_EXCEPTION
= 1;
21
const
REGEX_EXCEPTION
= 2;
22
const
UNIQUE_EXCEPTION
= 3;
23
const
NOT_URL
= 4;
24
const
NOT_IMAGE
= 5;
25
26
private
$exception_type
;
27
28
/*
29
* __construct
30
*/
31
public
function
__construct
(
$exception_type
)
32
{
33
parent::__construct(
$exception_type
);
34
$this->exception_type =
$exception_type
;
35
}
36
37
/*
38
* getExceptionType
39
*/
40
public
function
getExceptionType
()
41
{
42
return
$this->exception_type
;
43
}
44
45
/*
46
* __toString
47
*/
48
public
function
__toString
()
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
}
70
71
}
ilDataCollectionInputException\NOT_IMAGE
const NOT_IMAGE
Definition:
class.ilDataCollectionInputException.php:24
ilException
Base class for ILIAS Exception handling.
Definition:
class.ilException.php:34
ilDataCollectionInputException\getExceptionType
getExceptionType()
Definition:
class.ilDataCollectionInputException.php:40
ilDataCollectionInputException\UNIQUE_EXCEPTION
const UNIQUE_EXCEPTION
Definition:
class.ilDataCollectionInputException.php:22
ilDataCollectionInputException\REGEX_EXCEPTION
const REGEX_EXCEPTION
Definition:
class.ilDataCollectionInputException.php:21
ilDataCollectionInputException\TYPE_EXCEPTION
const TYPE_EXCEPTION
Definition:
class.ilDataCollectionInputException.php:19
ilDataCollectionInputException\$exception_type
$exception_type
Definition:
class.ilDataCollectionInputException.php:26
ilDataCollectionInputException\LENGTH_EXCEPTION
const LENGTH_EXCEPTION
Definition:
class.ilDataCollectionInputException.php:20
ilDataCollectionInputException\NOT_URL
const NOT_URL
Definition:
class.ilDataCollectionInputException.php:23
ilDataCollectionInputException\__construct
__construct($exception_type)
Definition:
class.ilDataCollectionInputException.php:31
$lng
global $lng
Definition:
privfeed.php:40
ilDataCollectionInputException
Class ilDataCollectionField.
Definition:
class.ilDataCollectionInputException.php:17
ilDataCollectionInputException\__toString
__toString()
Definition:
class.ilDataCollectionInputException.php:48
Modules
DataCollection
exceptions
class.ilDataCollectionInputException.php
Generated on Mon Dec 21 2020 19:01:01 for ILIAS by
1.8.13 (using
Doxyfile
)