ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilias.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
16class ILIAS
17{
23
29 var $dsn = "";
30
36 var $db;
37
43 var $tplPath = "./templates/";
44
51
57 var $auth_params = array();
58
64 var $auth;
65
71 var $ini = array();
72
79
87
95
103
109 function ILIAS($a_client_id = 0)
110 {
111 global $ilErr, $ilDB, $ilIliasIniFile, $ilClientIniFile, $ilAuth;
112
113 $this->ini_ilias =& $ilIliasIniFile;
114 $this->client_id = CLIENT_ID;
115 $this->ini =& $ilClientIniFile;
116 $this->db =& $ilDB;
117 $this->error_obj =& $ilErr;
118 $this->auth =& $ilAuth;
119
120 // create instance of object factory
121 include_once("./Services/Object/classes/class.ilObjectFactory.php");
122 $this->obj_factory =& new ilObjectFactory();
123 }
124
130 function _ILIAS()
131 {
132 if ($this->ini->readVariable("db", "type") != "")
133 {
134 $this->db->disconnect();
135 }
136
137 return true;
138 }
139
140
147 function setAuthError($a_error_obj)
148 {
149 $this->auth_error =& $a_error_obj;
150 }
151
155 function &getAuthError()
156 {
157 return $this->auth_error;
158 }
159
168 function getSetting($a_keyword, $a_default_value = false)
169 {
170 global $ilSetting;
171
172 return $ilSetting->get($a_keyword, $a_default_value);
173 }
174
181 function deleteSetting($a_keyword)
182 {
183 global $ilSetting;
184
185 return $ilSetting->delete($a_keyword);
186 }
187
188
194 function getAllSettings()
195 {
196 global $ilSetting;
197
198 return $ilSetting->getAll();
199 }
200
210 function setSetting($a_key, $a_val)
211 {
212 global $ilSetting;
213
214 return $ilSetting->set($a_key, $a_val);
215 }
216
217
224 function getFirstStyle($a_skin)
225 {
226 if (!is_array($this->styles))
227 {
228 $this->getStyles($a_skin);
229 }
230
231 return $this->styles[0]["name"];
232 }
233
240 function checkTemplate($a_name)
241 {
242 return file_exists($this->tplPath.$a_name);
243 }
244
248 function &getCurrentUser()
249 {
250 return $this->account;
251 }
252
253 function getClientId()
254 {
255 return $this->client_id;
256 }
257
261 function raiseError($a_msg,$a_err_obj)
262 {
263 global $ilErr;
264
265 $ilErr->raiseError($a_msg,$a_err_obj);
266 }
267
268
269
270} // END class.ilias
271?>
ILIAS base class perform basic setup: init database handler, load configuration file,...
Definition: class.ilias.php:17
ILIAS($a_client_id=0)
Constructor setup ILIAS global object @access public.
setAuthError($a_error_obj)
set authentication error (should be set after Auth->start() via $ilias->setAuthError($ilErr->getLastE...
getFirstStyle($a_skin)
get first available stylesheet from skindirectory
checkTemplate($a_name)
check if a template name exists on the server
& getCurrentUser()
get current user account
getAllSettings()
read all values from settingstable @access public
getClientId()
& getAuthError()
get (last) authentication error object
_ILIAS()
Destructor @access private.
$auth_params
Definition: class.ilias.php:57
raiseError($a_msg, $a_err_obj)
wrapper for downward compability
deleteSetting($a_keyword)
delete one value from settingstable @access public
getSetting($a_keyword, $a_default_value=false)
read one value from settingstable @access public
setSetting($a_key, $a_val)
write one value to db-table settings @access public
$obj_factory
Definition: class.ilias.php:86
Class ilObjectFactory.
$client_id
global $ilSetting
Definition: privfeed.php:40
global $ilDB
global $ilIliasIniFile