ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 31 of file class.ilCASSettings.php.

32 {
33 $this->storage = new ilSetting();
34 $this->read();
35 }
read()
Read settings.
ILIAS Setting Class.

References read().

+ Here is the call graph for this function:

Member Function Documentation

◆ enableLocalAuthentication()

ilCASSettings::enableLocalAuthentication (   $a_local)

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

109 {
110 $this->allow_local = $a_local;
111 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableUserCreation()

ilCASSettings::enableUserCreation (   $a_uc)

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

99 {
100 $this->create_users = $a_uc;
101 }

Referenced by read().

+ Here is the caller graph for this function:

◆ getDefaultRole()

ilCASSettings::getDefaultRole ( )

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

124 {
125 return $this->default_role;
126 }

Referenced by save().

+ Here is the caller graph for this function:

◆ getInstance()

static ilCASSettings::getInstance ( )
static

Get singleton instance.

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

41 {
42 if (self::$instance) {
43 return self::$instance;
44 }
45 return self::$instance = new ilCASSettings();
46 }
Description of class.

References $instance.

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

+ Here is the caller graph for this function:

◆ getLoginInstruction()

ilCASSettings::getLoginInstruction ( )

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

References $login_instructions.

Referenced by save().

+ Here is the caller graph for this function:

◆ getPort()

ilCASSettings::getPort ( )

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

64 {
65 return $this->port;
66 }

References $port.

Referenced by save().

+ Here is the caller graph for this function:

◆ getServer()

ilCASSettings::getServer ( )

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

54 {
55 return $this->server;
56 }

References $server.

Referenced by save().

+ Here is the caller graph for this function:

◆ getStorage()

ilCASSettings::getStorage ( )
private

Get storage object.

Returns
ilSetting

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

166 {
167 return $this->storage;
168 }

References $storage.

Referenced by read(), and save().

+ Here is the caller graph for this function:

◆ getUri()

ilCASSettings::getUri ( )

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

74 {
75 return $this->uri;
76 }

References $uri.

Referenced by save().

+ Here is the caller graph for this function:

◆ isActive()

ilCASSettings::isActive ( )

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

94 {
95 return $this->active;
96 }

References $active.

Referenced by save().

+ Here is the caller graph for this function:

◆ isLocalAuthenticationEnabled()

ilCASSettings::isLocalAuthenticationEnabled ( )

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

114 {
115 return $this->allow_local;
116 }

References $allow_local.

Referenced by save().

+ Here is the caller graph for this function:

◆ isUserCreationEnabled()

ilCASSettings::isUserCreationEnabled ( )

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

104 {
105 return $this->create_users;
106 }

References $create_users.

Referenced by save().

+ Here is the caller graph for this function:

◆ read()

ilCASSettings::read ( )
private

Read settings.

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

147 {
148 $this->setServer($this->getStorage()->get('cas_server', $this->server));
149 $this->setPort($this->getStorage()->get('cas_port', $this->port));
150 $this->setUri($this->getStorage()->get('cas_uri', $this->uri));
151 $this->setActive($this->getStorage()->get('cas_active', $this->active));
152 $this->setDefaultRole($this->getStorage()->get('cas_user_default_role', $this->default_role));
153 $this->setLoginInstruction($this->getStorage()->get('cas_login_instructions', $this->login_instructions));
154 $this->enableLocalAuthentication($this->getStorage()->get('cas_allow_local', $this->allow_local));
155 $this->enableUserCreation($this->getStorage()->get('cas_create_users', $this->create_users));
156 }
getStorage()
Get storage object.
enableLocalAuthentication($a_local)
setLoginInstruction($a_inst)

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

Save settings.

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

132 {
133 $this->getStorage()->set('cas_server', $this->getServer());
134 $this->getStorage()->set('cas_port', $this->getPort());
135 $this->getStorage()->set('cas_uri', $this->getUri());
136 $this->getStorage()->set('cas_login_instructions', $this->getLoginInstruction());
137 $this->getStorage()->set('cas_active', $this->isActive());
138 $this->getStorage()->set('cas_create_users', $this->isUserCreationEnabled());
139 $this->getStorage()->set('cas_allow_local', $this->isLocalAuthenticationEnabled());
140 $this->getStorage()->set('cas_user_default_role', $this->getDefaultRole());
141 }

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 88 of file class.ilCASSettings.php.

89 {
90 $this->active = $a_active;
91 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setDefaultRole()

ilCASSettings::setDefaultRole (   $a_role)

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

119 {
120 $this->default_role = $a_role;
121 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLoginInstruction()

ilCASSettings::setLoginInstruction (   $a_inst)

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

79 {
80 $this->login_instructions = $a_inst;
81 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setPort()

ilCASSettings::setPort (   $a_port)

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

59 {
60 $this->port = $a_port;
61 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setServer()

ilCASSettings::setServer (   $a_server)

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

49 {
50 $this->server = $a_server;
51 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setUri()

ilCASSettings::setUri (   $a_uri)

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

69 {
70 $this->uri = $a_uri;
71 }

Referenced by read().

+ Here is the caller graph for this function:

Field Documentation

◆ $active

ilCASSettings::$active = 0
private

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

Referenced by isActive().

◆ $allow_local

ilCASSettings::$allow_local = 0
private

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

Referenced by isLocalAuthenticationEnabled().

◆ $create_users

ilCASSettings::$create_users = 0
private

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

Referenced by isUserCreationEnabled().

◆ $instance

ilCASSettings::$instance = null
staticprivate

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

Referenced by getInstance().

◆ $login_instructions

ilCASSettings::$login_instructions = ''
private

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

Referenced by getLoginInstruction().

◆ $port

ilCASSettings::$port = 0
private

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

Referenced by getPort().

◆ $server

ilCASSettings::$server = ''
private

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

Referenced by getServer().

◆ $storage

ilCASSettings::$storage = null
private

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

Referenced by getStorage().

◆ $uri

ilCASSettings::$uri = ''
private

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

Referenced by getUri().

◆ $user_default_role

ilCASSettings::$user_default_role = 0
private

Definition at line 26 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: