ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 __construct($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
125
126
133 function setAuthError($a_error_obj)
134 {
135 $this->auth_error =& $a_error_obj;
136 }
137
141 function &getAuthError()
142 {
143 return $this->auth_error;
144 }
145
154 function getSetting($a_keyword, $a_default_value = false)
155 {
156 global $ilSetting;
157
158 return $ilSetting->get($a_keyword, $a_default_value);
159 }
160
167 function deleteSetting($a_keyword)
168 {
169 global $ilSetting;
170
171 return $ilSetting->delete($a_keyword);
172 }
173
174
180 function getAllSettings()
181 {
182 global $ilSetting;
183
184 return $ilSetting->getAll();
185 }
186
196 function setSetting($a_key, $a_val)
197 {
198 global $ilSetting;
199
200 return $ilSetting->set($a_key, $a_val);
201 }
202
203
210 function getFirstStyle($a_skin)
211 {
212 if (!is_array($this->styles))
213 {
214 $this->getStyles($a_skin);
215 }
216
217 return $this->styles[0]["name"];
218 }
219
226 function checkTemplate($a_name)
227 {
228 return file_exists($this->tplPath.$a_name);
229 }
230
234 function &getCurrentUser()
235 {
236 return $this->account;
237 }
238
239 function getClientId()
240 {
241 return $this->client_id;
242 }
243
247 function raiseError($a_msg,$a_err_obj)
248 {
249 global $ilErr;
250
251 $ilErr->raiseError($a_msg,$a_err_obj);
252 }
253
254
255
256} // END class.ilias
257?>
An exception for terminatinating execution or to throw for unit testing.
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
$auth_params
Definition: class.ilias.php:57
raiseError($a_msg, $a_err_obj)
wrapper for downward compability
__construct($a_client_id=0)
Constructor setup ILIAS global object @access public.
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
Interface Card \UI\Component\Card.
global $ilSetting
Definition: privfeed.php:17
global $ilErr
Definition: raiseError.php:16
global $ilDB
$ilIliasIniFile