ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCASSettings Class Reference
+ Collaboration diagram for ilCASSettings:

Public Member Functions

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

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 ()
 
 getStorage ()
 

Private Attributes

ilSetting $storage
 
string $server = ''
 
int $port = 0
 
string $uri = ''
 
string $login_instructions = ''
 
bool $active = false
 
bool $create_users = false
 
bool $allow_local = false
 
int $user_default_role = 0
 
int $default_role = 0
 

Static Private Attributes

static ilCASSettings $instance = null
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ __construct()

ilCASSettings::__construct ( )
protected

Singleton constructor.

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

References $DIC, and read().

45  {
46  global $DIC;
47 
48  $this->storage = $DIC->settings();
49  $this->read();
50  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ enableLocalAuthentication()

ilCASSettings::enableLocalAuthentication (   $a_local)

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

Referenced by read().

123  : void
124  {
125  $this->allow_local = $a_local;
126  }
+ Here is the caller graph for this function:

◆ enableUserCreation()

ilCASSettings::enableUserCreation (   $a_uc)

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

Referenced by read().

113  : void
114  {
115  $this->create_users = $a_uc;
116  }
+ Here is the caller graph for this function:

◆ getDefaultRole()

ilCASSettings::getDefaultRole ( )

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

References $default_role.

Referenced by save().

138  : int
139  {
140  return $this->default_role;
141  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilCASSettings::getInstance ( )
static

Get singleton instance.

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

Referenced by ilAuthProviderCAS\__construct(), ilCASSettingsGUI\__construct(), and ilCASSettingsTest\setGlobalVariable().

56  {
57  if (self::$instance) {
58  return self::$instance;
59  }
60  return self::$instance = new ilCASSettings();
61  }
+ Here is the caller graph for this function:

◆ getLoginInstruction()

ilCASSettings::getLoginInstruction ( )

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

References $login_instructions.

Referenced by save().

98  : string
99  {
101  }
+ Here is the caller graph for this function:

◆ getPort()

ilCASSettings::getPort ( )

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

References $port.

Referenced by save().

78  : int
79  {
80  return $this->port;
81  }
+ Here is the caller graph for this function:

◆ getServer()

ilCASSettings::getServer ( )

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

References $server.

Referenced by save().

68  : string
69  {
70  return $this->server;
71  }
+ Here is the caller graph for this function:

◆ getStorage()

ilCASSettings::getStorage ( )
private

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

References $storage.

Referenced by read(), and save().

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

◆ getUri()

ilCASSettings::getUri ( )

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

References $uri.

Referenced by save().

88  : string
89  {
90  return $this->uri;
91  }
+ Here is the caller graph for this function:

◆ isActive()

ilCASSettings::isActive ( )

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

References $active.

Referenced by save().

108  : bool
109  {
110  return $this->active;
111  }
+ Here is the caller graph for this function:

◆ isLocalAuthenticationEnabled()

ilCASSettings::isLocalAuthenticationEnabled ( )

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

References $allow_local.

Referenced by save().

128  : bool
129  {
130  return $this->allow_local;
131  }
+ Here is the caller graph for this function:

◆ isUserCreationEnabled()

ilCASSettings::isUserCreationEnabled ( )

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

References $create_users.

Referenced by save().

118  : bool
119  {
120  return $this->create_users;
121  }
+ Here is the caller graph for this function:

◆ read()

ilCASSettings::read ( )
private

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

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

Referenced by __construct().

155  : void
156  {
157  $this->setServer($this->getStorage()->get('cas_server', $this->server));
158  $this->setPort((int) $this->getStorage()->get('cas_port', (string) $this->port));
159  $this->setUri($this->getStorage()->get('cas_uri', $this->uri));
160  $this->setActive((bool) $this->getStorage()->get('cas_active', (string) $this->active));
161  $this->setDefaultRole((int) $this->getStorage()->get('cas_user_default_role', (string) $this->user_default_role));
162  $this->setLoginInstruction($this->getStorage()->get('cas_login_instructions', $this->login_instructions));
163  $this->enableLocalAuthentication((bool) $this->getStorage()->get('cas_allow_local', (string) $this->allow_local));
164  $this->enableUserCreation((bool) $this->getStorage()->get('cas_create_users', (string) $this->create_users));
165  }
setLoginInstruction(string $a_inst)
enableLocalAuthentication($a_local)
setUri(string $a_uri)
setPort(int $a_port)
setServer(string $a_server)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilCASSettings::save ( )

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

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

143  : void
144  {
145  $this->getStorage()->set('cas_server', $this->getServer());
146  $this->getStorage()->set('cas_port', (string) $this->getPort());
147  $this->getStorage()->set('cas_uri', $this->getUri());
148  $this->getStorage()->set('cas_login_instructions', $this->getLoginInstruction());
149  $this->getStorage()->set('cas_active', (string) $this->isActive());
150  $this->getStorage()->set('cas_create_users', (string) $this->isUserCreationEnabled());
151  $this->getStorage()->set('cas_allow_local', (string) $this->isLocalAuthenticationEnabled());
152  $this->getStorage()->set('cas_user_default_role', (string) $this->getDefaultRole());
153  }
+ Here is the call graph for this function:

◆ setActive()

ilCASSettings::setActive (   $a_active)

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

Referenced by read().

103  : void
104  {
105  $this->active = $a_active;
106  }
+ Here is the caller graph for this function:

◆ setDefaultRole()

ilCASSettings::setDefaultRole (   $a_role)

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

Referenced by read().

133  : void
134  {
135  $this->default_role = $a_role;
136  }
+ Here is the caller graph for this function:

◆ setLoginInstruction()

ilCASSettings::setLoginInstruction ( string  $a_inst)

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

Referenced by read().

93  : void
94  {
95  $this->login_instructions = $a_inst;
96  }
+ Here is the caller graph for this function:

◆ setPort()

ilCASSettings::setPort ( int  $a_port)

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

Referenced by read().

73  : void
74  {
75  $this->port = $a_port;
76  }
+ Here is the caller graph for this function:

◆ setServer()

ilCASSettings::setServer ( string  $a_server)

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

Referenced by read().

63  : void
64  {
65  $this->server = $a_server;
66  }
+ Here is the caller graph for this function:

◆ setUri()

ilCASSettings::setUri ( string  $a_uri)

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

Referenced by read().

83  : void
84  {
85  $this->uri = $a_uri;
86  }
+ Here is the caller graph for this function:

Field Documentation

◆ $active

bool ilCASSettings::$active = false
private

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

Referenced by isActive().

◆ $allow_local

bool ilCASSettings::$allow_local = false
private

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

Referenced by isLocalAuthenticationEnabled().

◆ $create_users

bool ilCASSettings::$create_users = false
private

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

Referenced by isUserCreationEnabled().

◆ $default_role

int ilCASSettings::$default_role = 0
private

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

Referenced by getDefaultRole().

◆ $instance

ilCASSettings ilCASSettings::$instance = null
staticprivate

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

◆ $login_instructions

string ilCASSettings::$login_instructions = ''
private

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

Referenced by getLoginInstruction().

◆ $port

int ilCASSettings::$port = 0
private

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

Referenced by getPort().

◆ $server

string ilCASSettings::$server = ''
private

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

Referenced by getServer().

◆ $storage

ilSetting ilCASSettings::$storage
private

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

Referenced by getStorage().

◆ $uri

string ilCASSettings::$uri = ''
private

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

Referenced by getUri().

◆ $user_default_role

int ilCASSettings::$user_default_role = 0
private

Definition at line 38 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

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