ILIAS  release_8 Revision v8.24
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.

45 {
46 global $DIC;
47
48 $this->storage = $DIC->settings();
49 $this->read();
50 }
global $DIC
Definition: feed.php:28

References $DIC, and read().

+ 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.

123 : void
124 {
125 $this->allow_local = $a_local;
126 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableUserCreation()

ilCASSettings::enableUserCreation (   $a_uc)

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

113 : void
114 {
115 $this->create_users = $a_uc;
116 }

Referenced by read().

+ Here is the caller graph for this function:

◆ getDefaultRole()

ilCASSettings::getDefaultRole ( )

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

138 : int
139 {
140 return $this->default_role;
141 }

References $default_role.

Referenced by save().

+ 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.

56 {
57 if (self::$instance) {
58 return self::$instance;
59 }
60 return self::$instance = new ilCASSettings();
61 }
static ilCASSettings $instance

References $instance.

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

+ Here is the caller graph for this function:

◆ getLoginInstruction()

ilCASSettings::getLoginInstruction ( )

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

98 : string
99 {
101 }

References $login_instructions.

Referenced by save().

+ Here is the caller graph for this function:

◆ getPort()

ilCASSettings::getPort ( )

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

78 : int
79 {
80 return $this->port;
81 }

References $port.

Referenced by save().

+ Here is the caller graph for this function:

◆ getServer()

ilCASSettings::getServer ( )

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

68 : string
69 {
70 return $this->server;
71 }

References $server.

Referenced by save().

+ Here is the caller graph for this function:

◆ getStorage()

ilCASSettings::getStorage ( )
private

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

167 : ilSetting
168 {
169 return $this->storage;
170 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $storage.

Referenced by read(), and save().

+ Here is the caller graph for this function:

◆ getUri()

ilCASSettings::getUri ( )

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

88 : string
89 {
90 return $this->uri;
91 }

References $uri.

Referenced by save().

+ Here is the caller graph for this function:

◆ isActive()

ilCASSettings::isActive ( )

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

108 : bool
109 {
110 return $this->active;
111 }

References $active.

Referenced by save().

+ Here is the caller graph for this function:

◆ isLocalAuthenticationEnabled()

ilCASSettings::isLocalAuthenticationEnabled ( )

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

128 : bool
129 {
130 return $this->allow_local;
131 }

References $allow_local.

Referenced by save().

+ Here is the caller graph for this function:

◆ isUserCreationEnabled()

ilCASSettings::isUserCreationEnabled ( )

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

118 : bool
119 {
120 return $this->create_users;
121 }

References $create_users.

Referenced by save().

+ Here is the caller graph for this function:

◆ read()

ilCASSettings::read ( )
private

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

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 }
setUri(string $a_uri)
setLoginInstruction(string $a_inst)
setServer(string $a_server)
setPort(int $a_port)
enableLocalAuthentication($a_local)

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

Referenced by __construct().

+ 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.

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 }

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

+ Here is the call graph for this function:

◆ setActive()

ilCASSettings::setActive (   $a_active)

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

103 : void
104 {
105 $this->active = $a_active;
106 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultRole()

ilCASSettings::setDefaultRole (   $a_role)

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

133 : void
134 {
135 $this->default_role = $a_role;
136 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLoginInstruction()

ilCASSettings::setLoginInstruction ( string  $a_inst)

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

93 : void
94 {
95 $this->login_instructions = $a_inst;
96 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setPort()

ilCASSettings::setPort ( int  $a_port)

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

73 : void
74 {
75 $this->port = $a_port;
76 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setServer()

ilCASSettings::setServer ( string  $a_server)

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

63 : void
64 {
65 $this->server = $a_server;
66 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setUri()

ilCASSettings::setUri ( string  $a_uri)

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

83 : void
84 {
85 $this->uri = $a_uri;
86 }

Referenced by read().

+ 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.

Referenced by getInstance().

◆ $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: