ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilBuddySystem Class Reference

Class ilBuddySystem. More...

+ Collaboration diagram for ilBuddySystem:

Public Member Functions

 setSetting ($keyword, $value)
 
 getSetting ($keyword, $default=false)
 
 isEnabled ()
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 __construct ()
 

Protected Attributes

 $settings
 
 $user
 

Static Protected Attributes

static $instance
 
static $is_enabled
 

Detailed Description

Class ilBuddySystem.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilBuddySystem::__construct ( )
protected

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

34 {
35 global $DIC;
36
37 $this->settings = new ilSetting('buddysystem');
38 $this->user = $DIC['ilUser'];
39 }
user()
Definition: user.php:4
ILIAS Setting Class.
settings()
Definition: settings.php:2
global $DIC

References $DIC, settings(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getInstance()

static ilBuddySystem::getInstance ( )
static

◆ getSetting()

ilBuddySystem::getSetting (   $keyword,
  $default = false 
)
Parameters
string$keyword
bool | false$default
Returns
string

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

69 {
70 return $this->settings->get($keyword, $default);
71 }

References settings().

+ Here is the call graph for this function:

◆ isEnabled()

ilBuddySystem::isEnabled ( )
Returns
bool

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

77 {
78 if(self::$is_enabled !== null)
79 {
80 return self::$is_enabled;
81 }
82
83 if($this->user->isAnonymous())
84 {
85 self::$is_enabled = false;
86 return false;
87 }
88
89 self::$is_enabled = $this->settings->get('enabled', false);
90 return self::$is_enabled;
91 }

References $is_enabled, settings(), and user().

+ Here is the call graph for this function:

◆ setSetting()

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

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

59 {
60 $this->settings->set($keyword, $value);
61 }

References settings().

+ Here is the call graph for this function:

Field Documentation

◆ $instance

ilBuddySystem::$instance
staticprotected

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

Referenced by getInstance().

◆ $is_enabled

ilBuddySystem::$is_enabled
staticprotected

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

Referenced by isEnabled().

◆ $settings

ilBuddySystem::$settings
protected

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

◆ $user

ilBuddySystem::$user
protected

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


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