ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilBuddySystem Class Reference

Class ilBuddySystem. More...

+ Collaboration diagram for ilBuddySystem:

Public Member Functions

 setSetting (string $keyword, string $value)
 
 getSetting (string $keyword, ?string $default=null)
 
 isEnabled ()
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 __construct ()
 

Protected Attributes

ilSetting $settings
 
ilObjUser $user
 

Static Protected Attributes

static self $instance = null
 
static bool $isEnabled = null
 

Detailed Description

Class ilBuddySystem.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 25 of file class.ilBuddySystem.php.

Constructor & Destructor Documentation

◆ __construct()

ilBuddySystem::__construct ( )
protected

Definition at line 33 of file class.ilBuddySystem.php.

References $DIC, ILIAS\Repository\settings(), and ILIAS\Repository\user().

34  {
35  global $DIC;
36 
37  $this->settings = new ilSetting('buddysystem');
38  $this->user = $DIC['ilUser'];
39  }
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ getInstance()

static ilBuddySystem::getInstance ( )
static

◆ getSetting()

ilBuddySystem::getSetting ( string  $keyword,
?string  $default = null 
)

Definition at line 55 of file class.ilBuddySystem.php.

References ILIAS\Repository\settings().

55  : ?string
56  {
57  return $this->settings->get($keyword, $default);
58  }
+ Here is the call graph for this function:

◆ isEnabled()

ilBuddySystem::isEnabled ( )

Definition at line 60 of file class.ilBuddySystem.php.

References null, ILIAS\Repository\settings(), and ILIAS\Repository\user().

60  : bool
61  {
62  if (self::$isEnabled !== null) {
63  return self::$isEnabled;
64  }
65 
66  if ($this->user->isAnonymous()) {
67  self::$isEnabled = false;
68  return false;
69  }
70 
71  self::$isEnabled = (bool) $this->settings->get('enabled', '0');
72  return self::$isEnabled;
73  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ setSetting()

ilBuddySystem::setSetting ( string  $keyword,
string  $value 
)

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

References ILIAS\Repository\settings().

50  : void
51  {
52  $this->settings->set($keyword, $value);
53  }
+ Here is the call graph for this function:

Field Documentation

◆ $instance

self ilBuddySystem::$instance = null
staticprotected

Definition at line 27 of file class.ilBuddySystem.php.

◆ $isEnabled

bool ilBuddySystem::$isEnabled = null
staticprotected

Definition at line 28 of file class.ilBuddySystem.php.

◆ $settings

ilSetting ilBuddySystem::$settings
protected

Definition at line 30 of file class.ilBuddySystem.php.

◆ $user

ilObjUser ilBuddySystem::$user
protected

Definition at line 31 of file class.ilBuddySystem.php.


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