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 
16 class ILIAS
17 {
22  var $INI_FILE;
23 
29  var $dsn = "";
30 
36  var $db;
37 
43  var $tplPath = "./templates/";
44 
50  var $account;
51 
58 
64  var $auth;
65 
71  var $ini = array();
72 
79 
87 
94  var $styles;
95 
102  var $skins;
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 ?>
global $ilErr
Definition: raiseError.php:16
Class ilObjectFactory.
Interface Card .
getAllSettings()
read all values from settingstable public
& getAuthError()
get (last) authentication error object
getFirstStyle($a_skin)
get first available stylesheet from skindirectory
deleteSetting($a_keyword)
delete one value from settingstable public
checkTemplate($a_name)
check if a template name exists on the server
Create styles array
The data for the language used.
& getCurrentUser()
get current user account
global $ilSetting
Definition: privfeed.php:17
global $ilDB
$ilIliasIniFile
$client_id
getClientId()
setAuthError($a_error_obj)
set authentication error (should be set after Auth->start() via $ilias->setAuthError($ilErr->getLastE...
setSetting($a_key, $a_val)
write one value to db-table settings public
getSetting($a_keyword, $a_default_value=false)
read one value from settingstable public
$obj_factory
Definition: class.ilias.php:86
$auth_params
Definition: class.ilias.php:57
__construct($a_client_id=0)
Constructor setup ILIAS global object public.
raiseError($a_msg, $a_err_obj)
wrapper for downward compability