-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathError_Controller.php
More file actions
144 lines (117 loc) · 3.23 KB
/
Copy pathError_Controller.php
File metadata and controls
144 lines (117 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
/*******************************************************************************
*
* @author : Dominik Bonsch <[email protected]>
* @date :
* @copyright : Webfrap Developer Network <[email protected]>
* @project : Webfrap Web Frame Application
* @projectUrl : http://webfrap.net
*
* @licence : BSD License see: LICENCE/BSD Licence.txt
*
* @version: @package_version@ Revision: @package_revision@
*
* Changes:
*
*******************************************************************************/
/**
* Dummy class for Extentions
* This class will be loaded if the System requests for an Extention that
* doesn't exist
* @package WebFrap
* @subpackage Core
*/
class Error_Controller extends Controller
{
/*//////////////////////////////////////////////////////////////////////////////
// Attributes
//////////////////////////////////////////////////////////////////////////////*/
/**
* Enter description here...
*
* @var String
*/
protected $errorTitle = null;
/**
* Enter description here...
*
* @var String
*/
protected $errorMessage = null;
/*//////////////////////////////////////////////////////////////////////////////
// Run Method
//////////////////////////////////////////////////////////////////////////////*/
/**
* the controll function sends an error message to the user
*
* @param string $aktion
* @return void
*/
public function run($aktion = null)
{
$response = $this->getResponse();
$view = $response->loadView('error-message', 'Error');
$view->display($this->errorTitle, $this->errorMessage );
/*
$this->view->setTemplate('error/message');
$this->view->addVar
(array
(
'errorTitle' => $this->errorTitle,
'errorMessage' => $this->errorMessage
));
*/
}//end public function run */
/*//////////////////////////////////////////////////////////////////////////////
// Getter and Setter Method
//////////////////////////////////////////////////////////////////////////////*/
/**
* Setter for title
*
* @param string $title
*/
public function setErrorTitle($title)
{
$this->errorTitle = $title;
}//end public function setErrorTitle */
/**
* setter for message
*
* @param string $message
*/
public function setErrorMessage($message)
{
$this->errorMessage = $message;
}//end public function setErrorMessage */
/**
*
* @param unknown_type $message
* @return void
*/
public function displayError($type, $data = array() )
{
$this->$type($data);
}
/**
*
* Enter description here ...
* @param unknown_type $data
*/
public function displayException($data = array())
{
$response = $this->getResponse();
$view = $response->loadView('error-message', 'Error','displayException', View::MODAL);
$view->displayException($data[0]);
}//end public function displayException */
/**
*
* Enter description here ...
* @param unknown_type $data
*/
public function displayEnduserError($data = array())
{
$response = $this->getResponse();
$view = $response->loadView('error-message', 'Error');
$view->displayEnduserError($data[0]);
}//end public function displayEnduserError */
} // end class Error_Controller