ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
ilCASSettings Class Reference

Description of class. More...

+ Collaboration diagram for ilCASSettings:

Public Member Functions

 setServer ($a_server)
 
 getServer ()
 
 setPort ($a_port)
 
 getPort ()
 
 setUri ($a_uri)
 
 getUri ()
 
 setLoginInstruction ($a_inst)
 
 getLoginInstruction ()
 
 setActive ($a_active)
 
 isActive ()
 
 enableUserCreation ($a_uc)
 
 isUserCreationEnabled ()
 
 enableLocalAuthentication ($a_local)
 
 isLocalAuthenticationEnabled ()
 
 setDefaultRole ($a_role)
 
 getDefaultRole ()
 
 save ()
 Save settings. More...
 

Static Public Member Functions

static getInstance ()
 Get singleton instance. More...
 

Data Fields

const SYNC_DISABLED = 0
 
const SYNC_CAS = 1
 
const SYNC_LDAP = 2
 

Protected Member Functions

 __construct ()
 Singleton constructor. More...
 

Private Member Functions

 read ()
 Read settings. More...
 
 getStorage ()
 Get storage object. More...
 

Private Attributes

 $storage = null
 
 $server = ''
 
 $port = 0
 
 $uri = ''
 
 $login_instructions = ''
 
 $active = 0
 
 $create_users = 0
 
 $allow_local = 0
 
 $user_default_role = 0
 

Static Private Attributes

static $instance = null
 

Detailed Description

Description of class.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 10 of file class.ilCASSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilCASSettings::__construct ( )
protected

Singleton constructor.

Definition at line 32 of file class.ilCASSettings.php.

References read().

33  {
34  $this->storage = new ilSetting();
35  $this->read();
36  }
ILIAS Setting Class.
read()
Read settings.
+ Here is the call graph for this function:

Member Function Documentation

◆ enableLocalAuthentication()

ilCASSettings::enableLocalAuthentication (   $a_local)

Definition at line 110 of file class.ilCASSettings.php.

Referenced by read().

111  {
112  $this->allow_local = $a_local;
113  }
+ Here is the caller graph for this function:

◆ enableUserCreation()

ilCASSettings::enableUserCreation (   $a_uc)

Definition at line 100 of file class.ilCASSettings.php.

Referenced by read().

101  {
102  $this->create_users = $a_uc;
103  }
+ Here is the caller graph for this function:

◆ getDefaultRole()

ilCASSettings::getDefaultRole ( )

Definition at line 125 of file class.ilCASSettings.php.

Referenced by save().

126  {
127  return $this->default_role;
128  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilCASSettings::getInstance ( )
static

Get singleton instance.

Definition at line 41 of file class.ilCASSettings.php.

Referenced by ilCASSettingsGUI\__construct().

42  {
43  if(self::$instance)
44  {
45  return self::$instance;
46  }
47  return self::$instance = new ilCASSettings();
48  }
Description of class.
+ Here is the caller graph for this function:

◆ getLoginInstruction()

ilCASSettings::getLoginInstruction ( )

Definition at line 85 of file class.ilCASSettings.php.

References $login_instructions.

Referenced by save().

86  {
88  }
+ Here is the caller graph for this function:

◆ getPort()

ilCASSettings::getPort ( )

Definition at line 65 of file class.ilCASSettings.php.

References $port.

Referenced by save().

66  {
67  return $this->port;
68  }
+ Here is the caller graph for this function:

◆ getServer()

ilCASSettings::getServer ( )

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

References $server.

Referenced by save().

56  {
57  return $this->server;
58  }
+ Here is the caller graph for this function:

◆ getStorage()

ilCASSettings::getStorage ( )
private

Get storage object.

Returns
ilSetting

Definition at line 167 of file class.ilCASSettings.php.

References $storage.

Referenced by read(), and save().

168  {
169  return $this->storage;
170  }
+ Here is the caller graph for this function:

◆ getUri()

ilCASSettings::getUri ( )

Definition at line 75 of file class.ilCASSettings.php.

References $uri.

Referenced by save().

76  {
77  return $this->uri;
78  }
+ Here is the caller graph for this function:

◆ isActive()

ilCASSettings::isActive ( )

Definition at line 95 of file class.ilCASSettings.php.

References $active.

Referenced by save().

96  {
97  return $this->active;
98  }
+ Here is the caller graph for this function:

◆ isLocalAuthenticationEnabled()

ilCASSettings::isLocalAuthenticationEnabled ( )

Definition at line 115 of file class.ilCASSettings.php.

References $allow_local.

Referenced by save().

116  {
117  return $this->allow_local;
118  }
+ Here is the caller graph for this function:

◆ isUserCreationEnabled()

ilCASSettings::isUserCreationEnabled ( )

Definition at line 105 of file class.ilCASSettings.php.

References $create_users.

Referenced by save().

106  {
107  return $this->create_users;
108  }
+ Here is the caller graph for this function:

◆ read()

ilCASSettings::read ( )
private

Read settings.

Definition at line 148 of file class.ilCASSettings.php.

References enableLocalAuthentication(), enableUserCreation(), getStorage(), setActive(), setDefaultRole(), setLoginInstruction(), setPort(), setServer(), and setUri().

Referenced by __construct().

149  {
150  $this->setServer($this->getStorage()->get('cas_server',$this->server));
151  $this->setPort($this->getStorage()->get('cas_port',$this->port));
152  $this->setUri($this->getStorage()->get('cas_uri',$this->uri));
153  $this->setActive($this->getStorage()->get('cas_active',$this->active));
154  $this->setDefaultRole($this->getStorage()->get('cas_user_default_role',$this->default_role));
155  $this->setLoginInstruction($this->getStorage()->get('cas_login_instructions',$this->login_instructions));
156  $this->enableLocalAuthentication($this->getStorage()->get('cas_allow_local',$this->allow_local));
157  $this->enableUserCreation($this->getStorage()->get('cas_create_users',$this->create_users));
158  }
setLoginInstruction($a_inst)
getStorage()
Get storage object.
enableLocalAuthentication($a_local)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilCASSettings::save ( )

Save settings.

Definition at line 133 of file class.ilCASSettings.php.

References getDefaultRole(), getLoginInstruction(), getPort(), getServer(), getStorage(), getUri(), isActive(), isLocalAuthenticationEnabled(), and isUserCreationEnabled().

134  {
135  $this->getStorage()->set('cas_server', $this->getServer());
136  $this->getStorage()->set('cas_port', $this->getPort());
137  $this->getStorage()->set('cas_uri', $this->getUri());
138  $this->getStorage()->set('cas_login_instructions', $this->getLoginInstruction());
139  $this->getStorage()->set('cas_active', $this->isActive());
140  $this->getStorage()->set('cas_create_users', $this->isUserCreationEnabled());
141  $this->getStorage()->set('cas_allow_local', $this->isLocalAuthenticationEnabled());
142  $this->getStorage()->set('cas_user_default_role', $this->getDefaultRole());
143  }
getStorage()
Get storage object.
+ Here is the call graph for this function:

◆ setActive()

ilCASSettings::setActive (   $a_active)

Definition at line 90 of file class.ilCASSettings.php.

Referenced by read().

91  {
92  $this->active = $a_active;
93  }
+ Here is the caller graph for this function:

◆ setDefaultRole()

ilCASSettings::setDefaultRole (   $a_role)

Definition at line 120 of file class.ilCASSettings.php.

Referenced by read().

121  {
122  $this->default_role = $a_role;
123  }
+ Here is the caller graph for this function:

◆ setLoginInstruction()

ilCASSettings::setLoginInstruction (   $a_inst)

Definition at line 80 of file class.ilCASSettings.php.

Referenced by read().

81  {
82  $this->login_instructions = $a_inst;
83  }
+ Here is the caller graph for this function:

◆ setPort()

ilCASSettings::setPort (   $a_port)

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

Referenced by read().

61  {
62  $this->port = $a_port;
63  }
+ Here is the caller graph for this function:

◆ setServer()

ilCASSettings::setServer (   $a_server)

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

Referenced by read().

51  {
52  $this->server = $a_server;
53  }
+ Here is the caller graph for this function:

◆ setUri()

ilCASSettings::setUri (   $a_uri)

Definition at line 70 of file class.ilCASSettings.php.

Referenced by read().

71  {
72  $this->uri = $a_uri;
73  }
+ Here is the caller graph for this function:

Field Documentation

◆ $active

ilCASSettings::$active = 0
private

Definition at line 24 of file class.ilCASSettings.php.

Referenced by isActive().

◆ $allow_local

ilCASSettings::$allow_local = 0
private

Definition at line 26 of file class.ilCASSettings.php.

Referenced by isLocalAuthenticationEnabled().

◆ $create_users

ilCASSettings::$create_users = 0
private

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

Referenced by isUserCreationEnabled().

◆ $instance

ilCASSettings::$instance = null
staticprivate

Definition at line 17 of file class.ilCASSettings.php.

◆ $login_instructions

ilCASSettings::$login_instructions = ''
private

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

Referenced by getLoginInstruction().

◆ $port

ilCASSettings::$port = 0
private

Definition at line 21 of file class.ilCASSettings.php.

Referenced by getPort().

◆ $server

ilCASSettings::$server = ''
private

Definition at line 20 of file class.ilCASSettings.php.

Referenced by getServer().

◆ $storage

ilCASSettings::$storage = null
private

Definition at line 19 of file class.ilCASSettings.php.

Referenced by getStorage().

◆ $uri

ilCASSettings::$uri = ''
private

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

Referenced by getUri().

◆ $user_default_role

ilCASSettings::$user_default_role = 0
private

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

◆ SYNC_CAS

const ilCASSettings::SYNC_CAS = 1

◆ SYNC_DISABLED

const ilCASSettings::SYNC_DISABLED = 0

◆ SYNC_LDAP

const ilCASSettings::SYNC_LDAP = 2

Definition at line 15 of file class.ilCASSettings.php.

Referenced by ilCASSettingsGUI\save().


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