ILIAS  release_4-4 Revision
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

 ILIAS ($a_client_id=0)
 Constructor setup ILIAS global object public. More...
 
 _ILIAS ()
 Destructor private. 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.

Member Function Documentation

◆ _ILIAS()

ILIAS::_ILIAS ( )

Destructor private.

Returns
boolean

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

131  {
132  if ($this->ini->readVariable("db", "type") != "")
133  {
134  $this->db->disconnect();
135  }
136 
137  return true;
138  }

◆ 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 240 of file class.ilias.php.

241  {
242  return file_exists($this->tplPath.$a_name);
243  }

◆ deleteSetting()

ILIAS::deleteSetting (   $a_keyword)

delete one value from settingstable public

Parameters
stringkeyword
Returns
string value

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

References $ilSetting.

182  {
183  global $ilSetting;
184 
185  return $ilSetting->delete($a_keyword);
186  }
global $ilSetting
Definition: privfeed.php:40

◆ getAllSettings()

ILIAS::getAllSettings ( )

read all values from settingstable public

Returns
array keyword/value pairs

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

References $ilSetting.

195  {
196  global $ilSetting;
197 
198  return $ilSetting->getAll();
199  }
global $ilSetting
Definition: privfeed.php:40

◆ getAuthError()

& ILIAS::getAuthError ( )

get (last) authentication error object

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

156  {
157  return $this->auth_error;
158  }

◆ getClientId()

ILIAS::getClientId ( )

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

References $client_id.

254  {
255  return $this->client_id;
256  }
$client_id

◆ getCurrentUser()

& ILIAS::getCurrentUser ( )

get current user account

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

References $account.

249  {
250  return $this->account;
251  }

◆ getFirstStyle()

ILIAS::getFirstStyle (   $a_skin)

get first available stylesheet from skindirectory

Parameters
string
Returns
string style name public

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

225  {
226  if (!is_array($this->styles))
227  {
228  $this->getStyles($a_skin);
229  }
230 
231  return $this->styles[0]["name"];
232  }

◆ 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 168 of file class.ilias.php.

References $ilSetting.

169  {
170  global $ilSetting;
171 
172  return $ilSetting->get($a_keyword, $a_default_value);
173  }
global $ilSetting
Definition: privfeed.php:40

◆ ILIAS()

ILIAS::ILIAS (   $a_client_id = 0)

Constructor setup ILIAS global object public.

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

References $ilErr, and $ilIliasIniFile.

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  }
Class ilObjectFactory.
global $ilIliasIniFile

◆ raiseError()

ILIAS::raiseError (   $a_msg,
  $a_err_obj 
)

wrapper for downward compability

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

References $ilErr.

262  {
263  global $ilErr;
264 
265  $ilErr->raiseError($a_msg,$a_err_obj);
266  }

◆ 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 147 of file class.ilias.php.

148  {
149  $this->auth_error =& $a_error_obj;
150  }

◆ 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 210 of file class.ilias.php.

References $ilSetting.

211  {
212  global $ilSetting;
213 
214  return $ilSetting->set($a_key, $a_val);
215  }
global $ilSetting
Definition: privfeed.php:40

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: