ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 _ILIAS ()
 Destructor private.
 setAuthError ($a_error_obj)
 set authentication error (should be set after Auth->start() via $ilias->setAuthError($ilErr->getLastError());
getAuthError ()
 get (last) authentication error object
 getSetting ($a_keyword, $a_default_value=false)
 read one value from settingstable public
 deleteSetting ($a_keyword)
 delete one value from settingstable public
 getAllSettings ()
 read all values from settingstable public
 setSetting ($a_key, $a_val)
 write one value to db-table settings public
 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
 getClientId ()
 raiseError ($a_msg, $a_err_obj)
 wrapper for downward compability

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:
class.ilias.php 20150 2009-06-08 18:02:33Z akill
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 ( )

Destructor private.

Returns
boolean

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

{
if ($this->ini->readVariable("db", "type") != "")
{
$this->db->disconnect();
}
return true;
}
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.

{
return file_exists($this->tplPath.$a_name);
}
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.

{
global $ilSetting;
return $ilSetting->delete($a_keyword);
}
ILIAS::getAllSettings ( )

read all values from settingstable public

Returns
array keyword/value pairs

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

References $ilSetting.

{
global $ilSetting;
return $ilSetting->getAll();
}
& ILIAS::getAuthError ( )

get (last) authentication error object

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

{
return $this->auth_error;
}
ILIAS::getClientId ( )

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

References $client_id.

{
}
& ILIAS::getCurrentUser ( )

get current user account

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

References $account.

{
}
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.

{
if (!is_array($this->styles))
{
$this->getStyles($a_skin);
}
return $this->styles[0]["name"];
}
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.

{
global $ilSetting;
return $ilSetting->get($a_keyword, $a_default_value);
}
ILIAS::ILIAS (   $a_client_id = 0)

Constructor setup ILIAS global object public.

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

References $ilAuth, $ilDB, $ilErr, and $ilIliasIniFile.

{
global $ilErr, $ilDB, $ilIliasIniFile, $ilClientIniFile, $ilAuth;
$this->ini_ilias =& $ilIliasIniFile;
$this->client_id = CLIENT_ID;
$this->ini =& $ilClientIniFile;
$this->db =& $ilDB;
$this->error_obj =& $ilErr;
$this->auth =& $ilAuth;
// create instance of object factory
include_once("./classes/class.ilObjectFactory.php");
$this->obj_factory =& new ilObjectFactory();
}
ILIAS::raiseError (   $a_msg,
  $a_err_obj 
)

wrapper for downward compability

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

References $ilErr.

{
global $ilErr;
$ilErr->raiseError($a_msg,$a_err_obj);
}
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.

{
$this->auth_error =& $a_error_obj;
}
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.

{
global $ilSetting;
return $ilSetting->set($a_key, $a_val);
}

Field Documentation

ILIAS::$account

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

Referenced by getCurrentUser().

ILIAS::$auth

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

ILIAS::$auth_params = array()

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

ILIAS::$db

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

ILIAS::$dsn = ""

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

ILIAS::$error_obj

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

ILIAS::$ini = array()

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

ILIAS::$INI_FILE

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

ILIAS::$obj_factory

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

ILIAS::$skins

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

ILIAS::$styles

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

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

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


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