ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ILIAS Class Reference

ILIAS base class perform basic setup: init database handler, load configuration file, init user authentification & error handler, load object type definitions. More...

+ Collaboration diagram for ILIAS:

Public Member Functions

 __construct ($a_client_id=0)
 Constructor setup ILIAS global object public. More...
 
 setAuthError ($a_error_obj)
 set authentication error (should be set after Auth->start() via $ilias->setAuthError($ilErr->getLastError()); More...
 
getAuthError ()
 get (last) authentication error object More...
 
 getSetting ($a_keyword, $a_default_value=false)
 read one value from settingstable public More...
 
 deleteSetting ($a_keyword)
 delete one value from settingstable public More...
 
 getAllSettings ()
 read all values from settingstable public More...
 
 setSetting ($a_key, $a_val)
 write one value to db-table settings public More...
 
 getFirstStyle ($a_skin)
 get first available stylesheet from skindirectory More...
 
 checkTemplate ($a_name)
 check if a template name exists on the server More...
 
getCurrentUser ()
 get current user account More...
 
 getClientId ()
 
 raiseError ($a_msg, $a_err_obj)
 wrapper for downward compability More...
 

Data Fields

 $INI_FILE
 
 $dsn = ""
 
 $db
 
 $tplPath = "./templates/"
 
 $account
 
 $auth_params = array()
 
 $auth
 
 $ini = array()
 
 $error_obj
 
 $obj_factory
 
 $styles
 
 $skins
 

Detailed Description

ILIAS base class perform basic setup: init database handler, load configuration file, init user authentification & error handler, load object type definitions.

Author
Sascha Hofmann shofm.nosp@m.ann@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$
Todo:
review the concept how the object type definition is loaded. We need a concept to edit the definitions via webfrontend in the admin console.

Definition at line 16 of file class.ilias.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS::__construct (   $a_client_id = 0)

Constructor setup ILIAS global object public.

Definition at line 109 of file class.ilias.php.

References $ilDB, $ilErr, and $ilIliasIniFile.

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  }
Class ilObjectFactory.
$ilErr
Definition: raiseError.php:18
global $ilDB
$ilIliasIniFile

Member Function Documentation

◆ checkTemplate()

ILIAS::checkTemplate (   $a_name)

check if a template name exists on the server

Parameters
stringtemplate name
Returns
boolean true if file exists public

Definition at line 228 of file class.ilias.php.

229  {
230  return file_exists($this->tplPath . $a_name);
231  }

◆ deleteSetting()

ILIAS::deleteSetting (   $a_keyword)

delete one value from settingstable public

Parameters
stringkeyword
Returns
string value

Definition at line 170 of file class.ilias.php.

References $ilSetting.

171  {
172  global $ilSetting;
173 
174  return $ilSetting->delete($a_keyword);
175  }
global $ilSetting
Definition: privfeed.php:17

◆ getAllSettings()

ILIAS::getAllSettings ( )

read all values from settingstable public

Returns
array keyword/value pairs

Definition at line 183 of file class.ilias.php.

References $ilSetting.

184  {
185  global $ilSetting;
186 
187  return $ilSetting->getAll();
188  }
global $ilSetting
Definition: privfeed.php:17

◆ getAuthError()

& ILIAS::getAuthError ( )

get (last) authentication error object

Definition at line 144 of file class.ilias.php.

145  {
146  return $this->auth_error;
147  }

◆ getClientId()

ILIAS::getClientId ( )

Definition at line 241 of file class.ilias.php.

References $client_id.

242  {
243  return $this->client_id;
244  }
$client_id

◆ getCurrentUser()

& ILIAS::getCurrentUser ( )

get current user account

Definition at line 236 of file class.ilias.php.

References $account.

237  {
238  return $this->account;
239  }

◆ getFirstStyle()

ILIAS::getFirstStyle (   $a_skin)

get first available stylesheet from skindirectory

Parameters
string
Returns
string style name public

Definition at line 213 of file class.ilias.php.

214  {
215  if (!is_array($this->styles)) {
216  $this->getStyles($a_skin);
217  }
218 
219  return $this->styles[0]["name"];
220  }

◆ getSetting()

ILIAS::getSetting (   $a_keyword,
  $a_default_value = false 
)

read one value from settingstable public

Parameters
stringkeyword
stringdefault_value This value is returned, when no setting has been found for the keyword.
Returns
string value

Definition at line 157 of file class.ilias.php.

References $ilSetting.

158  {
159  global $ilSetting;
160 
161  return $ilSetting->get($a_keyword, $a_default_value);
162  }
global $ilSetting
Definition: privfeed.php:17

◆ raiseError()

ILIAS::raiseError (   $a_msg,
  $a_err_obj 
)

wrapper for downward compability

Definition at line 249 of file class.ilias.php.

References $ilErr.

250  {
251  global $ilErr;
252 
253  $ilErr->raiseError($a_msg, $a_err_obj);
254  }
$ilErr
Definition: raiseError.php:18

◆ setAuthError()

ILIAS::setAuthError (   $a_error_obj)

set authentication error (should be set after Auth->start() via $ilias->setAuthError($ilErr->getLastError());

Parameters
object$a_error_objpear error object

Definition at line 136 of file class.ilias.php.

137  {
138  $this->auth_error = &$a_error_obj;
139  }

◆ setSetting()

ILIAS::setSetting (   $a_key,
  $a_val 
)

write one value to db-table settings public

Parameters
stringkeyword
stringvalue
Returns
boolean true on success

TODO: change to replace-statement

Definition at line 199 of file class.ilias.php.

References $ilSetting.

200  {
201  global $ilSetting;
202 
203  return $ilSetting->set($a_key, $a_val);
204  }
global $ilSetting
Definition: privfeed.php:17

Field Documentation

◆ $account

ILIAS::$account

Definition at line 50 of file class.ilias.php.

Referenced by getCurrentUser().

◆ $auth

ILIAS::$auth

Definition at line 64 of file class.ilias.php.

◆ $auth_params

ILIAS::$auth_params = array()

Definition at line 57 of file class.ilias.php.

◆ $db

ILIAS::$db

Definition at line 36 of file class.ilias.php.

◆ $dsn

ILIAS::$dsn = ""

Definition at line 29 of file class.ilias.php.

◆ $error_obj

ILIAS::$error_obj

Definition at line 78 of file class.ilias.php.

◆ $ini

ILIAS::$ini = array()

Definition at line 71 of file class.ilias.php.

◆ $INI_FILE

ILIAS::$INI_FILE

Definition at line 22 of file class.ilias.php.

◆ $obj_factory

ILIAS::$obj_factory

Definition at line 86 of file class.ilias.php.

◆ $skins

ILIAS::$skins

Definition at line 102 of file class.ilias.php.

◆ $styles

ILIAS::$styles

Definition at line 94 of file class.ilias.php.

◆ $tplPath

ILIAS::$tplPath = "./templates/"

Definition at line 43 of file class.ilias.php.


The documentation for this class was generated from the following file: