ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  public $INI_FILE;
23 
29  public $dsn = "";
30 
36  public $db;
37 
43  public $tplPath = "./templates/";
44 
50  public $account;
51 
57  public $auth_params = array();
58 
64  public $auth;
65 
71  public $ini = array();
72 
78  public $error_obj;
79 
86  public $obj_factory;
87 
94  public $styles;
95 
102  public $skins;
103 
109  public function __construct($a_client_id = 0)
110  {
111  global $ilErr, $ilDB, $ilIliasIniFile, $ilClientIniFile, $ilAuth;
112 
113  $this->ini_ilias =&$ilIliasIniFile;
114  $this->client_id = '';
115  if (defined('CLIENT_ID')) {
116  $this->client_id = CLIENT_ID;
117  }
118  $this->ini =&$ilClientIniFile;
119  $this->db =&$ilDB;
120  $this->error_obj =&$ilErr;
121  $this->auth =&$ilAuth;
122 
123  // create instance of object factory
124  include_once("./Services/Object/classes/class.ilObjectFactory.php");
125  $this->obj_factory = new ilObjectFactory();
126  }
127 
128 
129 
136  public function setAuthError($a_error_obj)
137  {
138  $this->auth_error =&$a_error_obj;
139  }
140 
144  public function &getAuthError()
145  {
146  return $this->auth_error;
147  }
148 
157  public function getSetting($a_keyword, $a_default_value = false)
158  {
159  global $ilSetting;
160 
161  return $ilSetting->get($a_keyword, $a_default_value);
162  }
163 
170  public function deleteSetting($a_keyword)
171  {
172  global $ilSetting;
173 
174  return $ilSetting->delete($a_keyword);
175  }
176 
177 
183  public function getAllSettings()
184  {
185  global $ilSetting;
186 
187  return $ilSetting->getAll();
188  }
189 
199  public function setSetting($a_key, $a_val)
200  {
201  global $ilSetting;
202 
203  return $ilSetting->set($a_key, $a_val);
204  }
205 
206 
213  public function getFirstStyle($a_skin)
214  {
215  if (!is_array($this->styles)) {
216  $this->getStyles($a_skin);
217  }
218 
219  return $this->styles[0]["name"];
220  }
221 
228  public function checkTemplate($a_name)
229  {
230  return file_exists($this->tplPath . $a_name);
231  }
232 
236  public function &getCurrentUser()
237  {
238  return $this->account;
239  }
240 
241  public function getClientId()
242  {
243  return $this->client_id;
244  }
245 
249  public function raiseError($a_msg, $a_err_obj)
250  {
251  global $ilErr;
252 
253  $ilErr->raiseError($a_msg, $a_err_obj);
254  }
255 } // END class.ilias
global $ilErr
Definition: raiseError.php:16
Class ilObjectFactory.
Class BaseForm.
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
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
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